-
-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(1-3247): remove explicit "in project" text from change request event text #9091
Merged
thomasheartman
merged 4 commits into
main
from
fix(1-3247)/change-request-event-formatting
Jan 14, 2025
Merged
fix(1-3247): remove explicit "in project" text from change request event text #9091
thomasheartman
merged 4 commits into
main
from
fix(1-3247)/change-request-event-formatting
Jan 14, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ent text The project is already included in the `changeRequest` variable, which is is populated in `src/lib/addons/feature-event-formatter-md.ts` by the `generateChangeRequestLink` function. The (current) definition is: ```typescript generateChangeRequestLink(event: IEvent): string | undefined { const { preData, data, project, environment } = event; const changeRequestId = data?.changeRequestId || preData?.changeRequestId; if (project && changeRequestId) { const url = `${this.unleashUrl}/projects/${project}/change-requests/${changeRequestId}`; const text = `#${changeRequestId}`; const featureLink = this.generateFeatureLink(event); const featureText = featureLink ? ` for feature flag ${this.bold(featureLink)}` : ''; const environmentText = environment ? ` in the ${this.bold(environment)} environment` : ''; const projectLink = this.generateProjectLink(event); const projectText = project ? ` in project ${this.bold(projectLink)}` : ''; if (this.linkStyle === LinkStyle.SLACK) { return `${this.bold(`<${url}|${text}>`)}${featureText}${environmentText}${projectText}`; } else { return `${this.bold(`[${text}](${url})`)}${featureText}${environmentText}${projectText}`; } } } ``` Which includes links, env, and project info already.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
gastonfournier
approved these changes
Jan 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG!
thomasheartman
commented
Jan 13, 2025
src/lib/addons/__snapshots__/feature-event-formatter-md.test.ts.snap
Outdated
Show resolved
Hide resolved
thomasheartman
deleted the
fix(1-3247)/change-request-event-formatting
branch
January 14, 2025 08:54
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We got an event for a scheduled application success today that looked a little something like this:
Notice that we're stating the project twice (once with a link (removed here) and once without).
This PR removes the redundancy in CR events:
The project is already included in the
changeRequest
variable, whichis populated in
src/lib/addons/feature-event-formatter-md.ts
bythe
generateChangeRequestLink
function.The (current) definition is:
Which includes links, env, and project info already.