8000 [INTERNAL] Enforce prefix for dependency updates by flovogt · Pull Request #350 · SAP/ui5-logger · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[INTERNAL] Enforce prefix for dependency updates #350

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

Merged
merged 3 commits into from
Nov 14, 2022

Conversation

flovogt
Copy link
Member
@flovogt flovogt commented Nov 11, 2022

When a commit message starts with [DEPENDENCY] we'll create an entry in the changelog when a new release is produced. Therefore we can enforce the usage of this prefix when dependabot creates PRs. prefix-development is set to "[INTERNAL]", which will not be listed in the changelog. So only for updates to dependencies and not for devDependencies a changelog entry is generated.

Also see https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#commit-message

@flovogt flovogt requested a review from RandomByte November 11, 2022 09:38
@coveralls
Copy link
coveralls commented Nov 11, 2022

Coverage Status

Coverage remained the same at 100.0% when pulling 85103ab on dependabot-commitmesssage-prefix into bfd3526 on main.

@RandomByte
Copy link
Member

I guess this is all the configuration Dependabot provides. From my understanding however, this would result in a commit message like [DEPENDENCY]: Bump npmlog from 5.0.1 to 7.0.1. Having the colon right after the prefix might prevent our regex from matching:

pattern: "^\\[(\\w*)\\]\\s(?:([^\\:]*)\\:\\s)?(.*)$"

See https://regex101.com/r/Pd1cCp/1

So if Dependabot can't be convinced to not add this colon, we might need to alter our regex. For example by adding an optional colon right after the prefix: https://regex101.com/r/5GToX4/1

@flovogt flovogt force-pushed the dependabot-commitmesssage-prefix branch from f420 8000 7b7 to 85103ab Compare November 14, 2022 10:36
@flovogt
Copy link
Member Author
flovogt commented Nov 14, 2022

I guess this is all the configuration Dependabot provides. From my understanding however, this would result in a commit message like [DEPENDENCY]: Bump npmlog from 5.0.1 to 7.0.1. Having the colon right after the prefix might prevent our regex from matching:

pattern: "^\\[(\\w*)\\]\\s(?:([^\\:]*)\\:\\s)?(.*)$"

See https://regex101.com/r/Pd1cCp/1

So if Dependabot can't be convinced to not add this colon, we might need to alter our regex. For example by adding an optional colon right after the prefix: https://regex101.com/r/5GToX4/1

Solved by adding a whitespace at the end of the prefix. I have opened a feature request at dependabot to provide a customizable prefix delimiter dependabot/dependabot-core#6122

@flovogt flovogt merged commit df54cc2 into main Nov 14, 2022
@flovogt flovogt deleted the dependabot-commitmesssage-prefix branch November 14, 2022 13:05
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
0