Skip to content

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

Merged
uniqueg merged 1 commit into
devfrom
ci/775-dependabot-labels
Nov 14, 2026
Merged

uniqueg merged 1 commit into
devfrom
ci/775-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 (6: pip, github-actions, three docker entries, helm).
  • Remove target-branch: dev from every entry (6 entries). dev is the default branch, so version updates still target it.
  • Add a comment that explains why no entry sets target-branch, so that it isn't added again.
  • Keep the ignore rules. They now also apply to security updates: the major-version holds on connexion (build: add support for Connexion 3+ #188) and gunicorn, the holds on minor and major updates of the python images and of the chart images, and the skipped example root images and foca-common. 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 #775

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.
  • Sourcery: version updates would target main instead of dev. Not so: dev is the default branch, which Dependabot targets without target-branch.

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 the default-branch target so the entry options also apply to security updates.

  • .github/dependabot.yml L14-110 (13 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 100.00%. Comparing base (4b06250) to head (1e1c624).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #776   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           74        74           
  Lines         9651      9651           
=========================================
  Hits          9651      9651           
Flag Coverage Δ
test_unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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 1e1c624

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

# Requirement Status Notes
1 No entry or group sets target-branch. ✅ Met
2 Every updates entry sets labels: ["type: dependencies"]. ✅ Met All six entries set the requested label.
3 Nothing else in the file changes, apart from the comment. ✅ Met The diff removes target-branch, adds the labels, and adds the explanatory comment; the other configuration is unchanged.
4 Dependabot pull requests opened afterwards, security updates included, carry only type: dependencies. 👀 Check by hand (runtime) Check real Dependabot version and security update pull requests after the change to confirm they carry only type: dependencies.

@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 2 issues

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

## Individual Comments

### Comment 1
<location path=".github/dependabot.yml" line_range="25" />
<code_context>
       - /docker/requirements
       - /examples/petstore
       - /examples/gateway
-    target-branch: dev
     schedule:
       interval: weekly
</code_context>
<issue_to_address>
**Security fixes stay blocked**

When a security advisory’s patched version requires an ignored major or minor update, an attacker can exploit a vulnerable dependency when its advisory’s patched version falls in an ignored major/minor range: Dependabot now applies these `ignore` rules to security updates and opens no remediation PR, so the vulnerable version remains in use.

Keep security fixes eligible despite version-update holds, or add an explicit process to surface and remediate advisories for dependencies covered by these ignores.

Also at `.github/dependabot.yml:69`, `.github/dependabot.yml:106`.
</issue_to_address>

### Comment 2
<location path=".github/dependabot.yml" line_range="25" />
<code_context>
       - /docker/requirements
       - /examples/petstore
       - /examples/gateway
-    target-branch: dev
     schedule:
       interval: weekly
</code_context>
<issue_to_address>
**Dependency updates bypass development checks**

When dependabot opens a version-update PR, dependabot targets `main` instead of `dev`, while CI only runs pull-request checks targeting `dev`, so the updates receive no expected CI checks and bypass the development-branch integration checks.

Set the Dependabot target branch to `dev` for these entries.

Also at `.github/dependabot.yml:14`, `.github/dependabot.yml:58`, `.github/dependabot.yml:69`, `.github/dependabot.yml:84`, `.github/dependabot.yml:93`, `.github/dependabot.yml:106`.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 2 findings to address first, and if the label configuration is wrong, Dependabot will add the label to generated pull requests, including security-update PRs. Reverting stops future labels but leaves labels on existing PRs; those can be removed manually, and the change does not alter the dependency updates themselves.

Blocking findings: .github/dependabot.yml:25, .github/dependabot.yml:25


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

Comment thread .github/dependabot.yml Resolved
Comment thread .github/dependabot.yml Resolved
@uniqueg
uniqueg merged commit 34348ef into dev Nov 14, 2026
133 checks passed
@uniqueg
uniqueg deleted the ci/775-dependabot-labels branch November 14, 2026 20:09
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