-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore: link PRs to linear issues #3191
Closed
Closed
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
CodSpeed Performance ReportMerging #3191 will improve performances by ×2.7Comparing Summary
Benchmarks breakdown
|
nedsalk
requested review from
digorithm,
arboleya,
Torres-ssf,
Dhaiwat10,
danielbate,
petertonysmith94 and
maschad
as code owners
September 24, 2024 07:32
arboleya
requested changes
Sep 24, 2024
Coverage Report:
Changed Files:Coverage values did not change👌. |
Superseded by FuelLabs/github-actions#40. |
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.
Summary
This PR adds a workflow which automatically links PRs to the corresponding linear issues by updating the body of the PR with markdown comments that contain linear-related magic words. The implementation supports all the GitHub magic words (closes, fixes, etc.). If one wants to relate a PR to an issue without setting it as closing for that issue, they can add a "relates to", "related to", or "part of" like this:
Besides linking issues, I also implemented unlinking issues for cases where somebody erroneously links the wrong issue in GitHub (e.g. wanted to close #ISSUE2 but wrote that it closes #ISSUE1). This isn't automatically handled by linear when the referenced linear issue's identifier is removed from the body of the PR, so I had to call the
linearClient.deleteAttachment
endpoint directly in these cases.I initially wanted to implement both linking and unlinking not by modifying the body of the PR but rather by using the API provided by the linear client, but then I realized that doing it like that doesn't add the metadata that gets added when using linear magic words.
Checklist