Skip to content
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

Add a new CI step to detect raw issue references in commit messages #3255

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

P-E-P
Copy link
Member

@P-E-P P-E-P commented Nov 20, 2024

Issue references shall now be used with the Rust GCC prefix in order to avoid mixing gccrs issues and GCC bugzilla PRs.

Fixes #3213.

@P-E-P P-E-P force-pushed the ci_issue_no_checker branch from 8ad72c6 to bc86f63 Compare November 20, 2024 15:14
@dkm
Copy link
Member

dkm commented Nov 20, 2024

I guess it should be fine, until it's not. But this will also reject a reference to some rust-lang bug, as it matches the first grep, but not the following that checks that every # is prefixed by our prefix. Also, I think the correct prefix should be Rust-GCC/gccrs. See #3213 that this PR fixes (or https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls).

.github/workflows/commit-format.yml Outdated Show resolved Hide resolved
@P-E-P P-E-P force-pushed the ci_issue_no_checker branch from bc86f63 to 8031eb2 Compare November 20, 2024 15:24
@P-E-P
Copy link
Member Author

P-E-P commented Nov 20, 2024

I guess it should be fine, until it's not. But this will also reject a reference to some rust-lang bug, as it matches the first grep, but not the following that checks that every # is prefixed by our prefix.

If such case arise we should be able to ignore this step, it will appear in red but the merge queue should work anyway.

Also, I think the correct prefix should be Rust-GCC/gccrs. See #3213 that this PR fixes (or https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls).

Ah nice, I forgot we had an issue for this, and I also forgot the exact prefix, I'll change this asap.

@P-E-P P-E-P force-pushed the ci_issue_no_checker branch from 8031eb2 to 8426429 Compare November 20, 2024 15:32
Issue references shall now be used with the Rust GCC prefix in order to
avoid mixing gccrs issues and GCC bugzilla PRs.

ChangeLog:

	* .github/workflows/commit-format.yml: Add a new step to detect issue
	references in commit messages.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
@P-E-P P-E-P force-pushed the ci_issue_no_checker branch from 8426429 to 384a206 Compare November 20, 2024 18:57
Copy link
Member

@dkm dkm left a comment

Choose a reason for hiding this comment

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

I think it's good now!

@philberty
Copy link
Member

philberty commented Nov 21, 2024

Merge this so you can try this out one me in this pr #3256

currently i am doing it like this:

Fixes Rust-GCC#3231
Fixes Rust-GCC#2567

Copy link
Member

@philberty philberty left a comment

Choose a reason for hiding this comment

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

LGTM great job

@P-E-P P-E-P added this pull request to the merge queue Nov 22, 2024
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

thanks! I think that looks good and I like it

done;
if [ "$retval" -ne 0 ]; then
echo "Some raw issue references were found (eg. #4242)."
echo "You shall rewrite the faulty commit message with this format: Rust-GCC/gccrs#4242"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
echo "You shall rewrite the faulty commit message with this format: Rust-GCC/gccrs#4242"
echo "Rewrite the faulty commit message with this format: Rust-GCC/gccrs#4242"

if [ "$retval" -ne 0 ]; then
echo "Some raw issue references were found (eg. #4242)."
echo "You shall rewrite the faulty commit message with this format: Rust-GCC/gccrs#4242"
echo "You may ignore this CI step if it represents a valid GCC bugzilla or external repository reference instead."
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
echo "You may ignore this CI step if it represents a valid GCC bugzilla or external repository reference instead."
echo "You may ignore this CI step if it represents a valid GCC bugzilla reference instead."

Merged via the queue into Rust-GCC:master with commit 0cb51bb Nov 22, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[meta] Enforce scoped Rust-GCC/gccrs#NNN instead of unadorned #NNN in Git commit logs
4 participants