Repository navigation
chore(ci): give Dependabot PRs conventional commit titles - #425
Conversation
Dependabot's default chore(deps) and chore(deps-dev) titles fail the PR title check because deps and deps-dev are not allowed scopes. Configure commit-message prefixes so runtime dependency bumps use fix(main), which release-please turns into a patch release, and development dependency bumps use chore(ci). open-pull-requests-limit: 0 keeps version updates off, so Dependabot still only opens security update PRs; those pick up the prefixes too. Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
## Summary - **checks.yaml / mavenverify:** pass `-Dsonar.skip=true` when `SONAR_TOKEN` is empty. Pushes to `main` and same-repo PRs still run the Sonar analysis. - **codeql.yaml:** pass `github_token` to `buf-setup-action`, as `checks.yaml` already does. ## Rationale Dependabot and fork PRs can't read Actions secrets. On #408, #407 and #387, `mavenverify` gets through the build and all tests, then fails in the Sonar goal: > [ERROR] Not authorized. Please check the 'sonar.token' property or the 'SONAR_TOKEN' environment variable ... `sonar-maven-plugin` checks `sonar.skip` before it starts the scanner ([source](https://github.com/SonarSource/sonar-scanner-maven/blob/master/sonar-maven-plugin/src/main/java/org/sonarsource/scanner/maven/SonarQubeMojo.java)), so the job now passes or fails on the build and tests alone. I put the change in the workflow instead of `pom.xml` because it depends on the CI environment. CodeQL on #407 failed with `API rate limit exceeded` inside the buf setup step. Without a token, that step calls the GitHub API unauthenticated and shares the runner IP's rate limit. ## Test plan - [x] YAML parses; checked the skip logic for empty and non-empty `SONAR_TOKEN` - [ ] This PR's own `mavenverify` still runs Sonar (token available) - [ ] After merge, the recreated Dependabot PRs show `sonar.skip = true: Skipping analysis` and `mavenverify` passes Companion PR: #425 (Dependabot PR titles). Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>



Summary
Adds
.github/dependabot.ymlso Dependabot PR titles pass the conventional commit check.fix(main): bump ...(release-please cuts a patch release)chore(ci): bump ...open-pull-requests-limit: 0keeps version updates off. Dependabot keeps opening security-update PRs only, as it does today, and those now use the prefixes too.Rationale
All three open Dependabot PRs (#408, #407, #387) fail Validate PR title:
Dependabot adds the
:after a prefix ending in)(docs).Caveat
Dependabot decides what counts as a development dependency. It labeled
bc-fipsasdeps-dev(it'stestscope insdk/pom.xml) even thoughsdk-fips-bcdepends on it at compile scope. Sobc-fipsbumps will be titledchore(ci), and release-please won't cut a release for them. Retitle those PRs tofix(main)before merging.Test plan
@dependabot recreateon fix(main): bump org.bouncycastle:bcprov-jdk18on from 1.84 to 1.85 #408, chore(ci): bump org.bouncycastle:bc-fips from 2.1.2 to 2.1.3 #407, chore(ci): bump org.assertj:assertj-core from 3.25.3 to 3.27.7 in /cmdline #387 and check the new titles pass the PR-title checkCompanion PR: skip the Sonar scan when
SONAR_TOKENis unavailable.Summary by CodeRabbit