-
Notifications
You must be signed in to change notification settings - Fork 85
Automatically fixup linked issues in subtree repository #1897
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
Conversation
21ac445
to
54f8126
Compare
I think we should gate this behind a manual command to do the relinking, in case there are issues we don't wreck everyone's PR descriptions. |
It's already gated behind the Putting the relink behind a manual command renders (IMO) this handler/pass useless, as I don't think anyone is going to use it and the situation is going to stay the same without any improvements. If we are worried about edge-cases we might miss, we can do a slow deployment, starting with lower traffic repos, and go higher trafic repo as we have more confidence in it. |
Hmm, I suppose it's fine to land this without a gate if we start with a slow repo and allow plenty of testing time |
This doesn't seem like it will help if the link is in a commit description, correct? If so, I'm not sure if it will help much if the common case is someone entering it in a commit. |
No indeed, if the "fixes" is in the commit it-self this handler won't help. Maybe we should give a warning when we cannot just fix it ourselves. |
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.
Left one question, otherwise the implementation looks good to me, and I think that if we opt into it on some subtree repo, it should be fine.
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.
I tested this on my test repo and it seems to work fine (modulo one nit).
Since this is gated behind an option, I'm fine with landing it after the nit is fixed. And then we can try it on some "smaller" repos, e.g. Cargo or Rust Analyzer.
and put back all the spaces, as too avoid to many modifications of the original written action.
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.
Looks great! Feel free to merge with/without squashing.
This PR adds a new handler to "relink" linked GitHub issues into their unambiguous form so that when pulling commits from a subtree into the main repository we don't accidentally closes issues in the wrong repository.
Example:
Fixes #123
(in rust-lang/clippy) would be automatically changed toFixes rust-lang/clippy#123
r? @ehuss