Skip to content

Add optional labeling for PRs that need DCO attention #120

Closed

Description

@dims

DCO2 reports failures through check results, but maintainers reviewing a large PR backlog need a simple way to find contributions waiting on DCO fixes. A label such as needs-dco would make those PRs searchable and give contributors a visible indication that action is needed.

Repositories can maintain their own labeling automation today, but that adds maintenance and can produce labels that disagree with DCO2's result, especially around remediation commits and maintainer overrides.

Could DCO2 offer optional label management with the following behavior?

  • Allow a repository to choose a label, such as needs-dco.
  • Add it when the DCO check requires attention, including after new commits are pushed.
  • Remove it when the check passes, including through remediation or a maintainer override.
  • Create the label if it does not exist, while preserving existing labels and their colors.
  • Include PRs already open when labeling is enabled.

The existing-PR behavior would be particularly useful for projects adopting DCO with a large backlog. Maintainers could identify outstanding sign-offs without asking every contributor to push another commit or manually inspecting each PR.

Activity

  1. tegioz commented on Oct 28, 2026

    @tegioz
    Collaborator

    Thanks @dims, we'll look into it 👍

  2. self-assigned this
    on Oct 28, 2026
  3. tegioz commented on Oct 30, 2026

    @tegioz
    Collaborator

    This is now available! Labeling is disabled by default. To enable it, set the label name in .github/dco.yml (e.g. label: needs-dco). You can find more details about how it works here.

    Please note that labeling requires a new permission (Pull requests: write), which organization owners need to approve for the DCO2 app. DCO checks keep working without it, but pull requests won't be labeled.

    Pull requests that were already open when labeling was enabled are labeled the next time new commits are pushed to them. DCO2 doesn't backfill labels on its own, because doing so would add extra complexity, and we'd like to keep this project as simple and lightweight as possible (it could also affect GitHub API rate limits). To label existing pull requests right away, you can use the label-open-prs.sh sample script. It's basically a wrapper around the GitHub CLI, and we recommend running it with --dry-run first.

    Closed by #122

  4. dims commented on Oct 30, 2026

    @dims
    MemberAuthor

    @tegioz thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions