Skip to content

josh-sync: Replace #xxxx-style links in messages #955

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tgross35
Copy link
Contributor

Often our short summaries will pick up a Bors "Auto merge of #xxxx ...commit message. Replace these with something likerust-lang/rust#1234` to avoid broken links when going between repositories.

@@ -77,6 +80,7 @@ impl GitSync {
"--depth=1",
]);
let new_summary = check_output(["git", "log", "-1", "--format=%h %s", &new_upstream_base]);
let new_summary = replace_references(&new_summary, &self.upstream_repo);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's great, I had no idea \B was a thing. Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid false positives (like #123az) I would also highly recommend using \b at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, missed that. Added, thanks

@tgross35 tgross35 force-pushed the replace-references branch 3 times, most recently from f5d0ed0 to b8065de Compare June 14, 2025 18:34
Often our short summaries will pick up a Bors "Auto merge of #xxxx ...`
commit message. Replace these with something like `rust-lang/rust#1234`
to avoid broken links when going between repositories.
@tgross35 tgross35 force-pushed the replace-references branch from 5f1732f to a67d3e6 Compare June 14, 2025 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants