ci/github-script/bot: only look at commit subject when deciding if a package is new/updated; refine regex#483759
Merged
Conversation
f9de8ef to
8b376d0
Compare
qweered
previously approved these changes
Jan 25, 2026
…package is new/updated
8b376d0 to
c717c98
Compare
f5c526c to
31876b4
Compare
qweered
reviewed
Jan 26, 2026
| const updatePackagePattern = /(?<!nixos\/\S+): [\w.-]+ (->|→) [\w.-]+/ | ||
| const commitsIndicateUpdate = commitMessages.some((msg) => | ||
| const updatePackagePattern = | ||
| /^(?<!nixos\/)\S+: [\w.-]*\d[\w.-]* (->|→) [\w.-]*\d[\w.-]*$/ |
Contributor
There was a problem hiding this comment.
eventially we want to do checks based on actully changed attrs of packages, but for now its good enough
Member
Author
There was a problem hiding this comment.
Totally. The motivation for this change was that it triggered on #474456, because of the "plfit: python -> withPython" commit. Since every valid version has a digit in it, checking for a digit fixes this particular issue.
qweered
approved these changes
Jan 26, 2026
philiptaron
approved these changes
Jan 26, 2026
Contributor
|
Successfully created backport PR for |
This file contains hidden or 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
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.
PR #483755 was labelled incorrectly, because the commit messages (but not the subjects) contained matching text.
The fix is to only look at the subject line.
Also, I missed that the regex for package update wasn't quite right:
(?<!nixos\/\S+): [\w.-]+ (->|→) [\w.-]+matches "plfit: python -> withPython", but shouldn't. I fixed this too, and anchored both regexes to ensure they aren't matching on unintended portions of a line.Things done