Skip to content

ci: let Dependabot label all its pull requests - #181

Open
uniqueg wants to merge 1 commit into
devfrom
ci/180-dependabot-labels
Open

uniqueg wants to merge 1 commit into
devfrom
ci/180-dependabot-labels

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Lets Dependabot label all its pull requests, security updates included, with the organisation's label type: dependencies only, instead of its own labels (dependencies plus an ecosystem label).

In .github/dependabot.yml:

  • Add labels: ["type: dependencies"] to every updates entry (4: maven, github-actions, docker, pip).
  • Remove target-branch: dev from every entry (4 entries). dev is the default branch, so version updates still target it.
  • Replace the header comment about target-branch with one that explains why no entry sets it.
  • Keep the ignore rules. They now also apply to security updates: the Spring Boot 3 hold-backs (build: move to Spring Boot 3 #66, build: hold back major updates until Spring Boot 3 #91), the openapi-generator-maven-plugin hold below 7 and the eclipse-temurin major hold. That's intended.

Nothing else changes: compared as data (keys sorted), the new file equals the old one minus target-branch plus labels on every entry.

Closes #180

Light lane: CI configuration only (Dependabot), no secrets, permissions or release workflow touched, so the reviewer subagents were skipped; I reviewed the diff myself.

Verification

  • yq parses the new .github/dependabot.yml; every updates entry has labels: ["type: dependencies"]; no target-branch is left.
  • Semantic diff against the default branch (yq -o=json 'sort_keys(..)'): only the intended change.
  • CI: all checks pass (CI passed green).

Declined review findings

  • Sourcery: the ignore rules now suppress security updates in held ranges. Intended (see above): those updates need hand-made changes, and Dependabot alerts, code scanning and the CI image scan still surface the advisories.

Open questions

None.

🤖 Generated with Claude Code

Set the organisation's label `type: dependencies` on every Dependabot
entry, so that its pull requests no longer get Dependabot's own labels.

Remove `target-branch` from every entry: it names the default branch
anyway, and while it is set, GitHub doesn't apply an entry's options,
labels included, to security updates. The `ignore` rules now also apply
to security updates, as intended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@uniqueg uniqueg self-assigned this Nov 14, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Add the organisation’s dependency label to every Dependabot update entry and remove target-branch so the entry options also apply to security updates.

  • .github/dependabot.yml L2-59 (9 small edits)

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.60%. Comparing base (645acf7) to head (fe75726).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #181   +/-   ##
=======================================
  Coverage   77.60%   77.60%           
=======================================
  Files          74       74           
  Lines        3487     3487           
  Branches      416      416           
=======================================
  Hits         2706     2706           
  Misses        621      621           
  Partials      160      160           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review November 14, 2026 19:29
@sourcery-ai

sourcery-ai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Linked issues

Checked at commit fe75726

#180 ci: let Dependabot label all its pull requests · 4 of 5 met · 1 to check by hand

# Requirement Status Notes
1 No entry or group sets target-branch. ✅ Met All four target-branch: dev settings are removed.
2 Every updates entry sets labels: ["type: dependencies"]. ✅ Met The Maven, GitHub Actions, Docker, and pip entries all set this label.
3 Update the header comment to explain why no entry sets target-branch. ✅ Met The comment explains the default branch behavior and why setting target-branch prevents options from applying to security updates.
4 Keep the ignore rules and make no other file changes apart from the comment. ✅ Met The existing ignore rules are preserved; the data changes are the requested label additions and target-branch removals.
5 Dependabot pull requests opened afterwards, including security updates, carry only type: dependencies. 👀 Check by hand (external system) After merge, check newly opened version and security update pull requests to confirm they carry only the type: dependencies label.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/dependabot.yml" line_range="12" />
<code_context>
     directory: /
     schedule:
       interval: monthly
-    target-branch: dev
     ignore:
       - dependency-name: org.springframework.boot:*
</code_context>
<issue_to_address>
**Security fixes are suppressed for held versions**

When a security fix for one of those dependencies is available only in a version matched by its ignore rule, dependabot applies these entries’ `ignore` rules to security updates, so it does not open an advisory PR and the affected dependency remains on its vulnerable version without an automated fix.

Allow security updates through the ignore rules, or provide a separate process to ensure fixes in the ignored ranges are applied promptly.

Also at `.github/dependabot.yml:46`.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: .github/dependabot.yml:12


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread .github/dependabot.yml Resolved

This branch has not been deployed

No deployments
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.

ci: let Dependabot label all its pull requests

1 participant