config: exempt Copilot-authored PRs from DCO requirement in Tide#1160
config: exempt Copilot-authored PRs from DCO requirement in Tide#1160
Conversation
|
Hi @Copilot. Thanks for your PR. I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Co-authored-by: ThatsMrTalbot <15379715+ThatsMrTalbot@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff:
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Duplicate of #1119? |
|
I think this one is more correct? The other one has If you look at a PR raised by Copilot like - https://api.github.com/repos/cert-manager/website/pulls/2011, the |
|
I think you are right, Prow's status.go#L161 seems to show that the In the case of cert-manager-bot though, the GitHub author login would be |
GitHub Copilot's PR-raise feature cannot produce DCO sign-offs, so Tide's
dco-signoff: yeslabel requirement permanently blocks Copilot PRs from merging.Change
Appends a new
tide.queriesentry matchingauthor: Copilotacross thecert-managerorg that:lgtm+approved— same review gates as human PRs (noskip-reviewshortcut)dco-signoff: yesmissingLabelsset, includingneeds-kindanddo-not-merge/release-note-label-neededThe Prow
dcoplugin is left untouched — it will still post the DCO status check, but Tide will not gate on the resulting label for this author. TheCopilotlogin was confirmed against cert-manager/website#2011.Original prompt
Create a PR in
cert-manager/testing(base branch:master) to update the Prow/Tide configuration so Copilot-authored PRs do not require DCO, but still require normal review gates and blockers.Context
This repo configures testing/github/ci infra for the cert-manager org. DCO is currently enforced via:
dco-signoff: yesinconfig/config.yamltide queries.dcoplugin (org-wide) inconfig/plugins.yaml.The user has determined PRs raised via GitHub Copilot Chat on GitHub.com have PR author login
Copilot(example PR: cert-manager/website#2011).They want AI-generated PRs to NOT bypass review and to keep the same missingLabels blockers, but to remove the DCO requirement for those PRs.
Change requested
Edit
config/config.yaml:tide:->queries:list, append a new query entry at the end (user request: “at the end”) that matches PRs withauthor: Copilotandorgs: [cert-manager].lgtmandapproved."dco-signoff: yes"label.Acceptance criteria
cert-manager/testingmaster.config/config.yamlis updated with the new Tide query entry appended at the end oftide.queries.Notes / considerations
config/config.yamlstyle.lgtm+approvedand are not affected by bot-specificskip-reviewqueries.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: I have tried making you sign off your commits, I have included it in prompts, you tell me you will and never do. I have come to the conclusion that your "raise pr" feature is incapable of signing off commits
Assistant: You’re probably correct: Copilot’s “raise PR” / coding-agent flow does not reliably produce DCO sign-offs, and prompt instructions alone aren’t enforceable. In your infra, DCO is enforced by Prow + Tide, so the practical fix is to stop requiring DCO for the PRs/actors that Copilot uses, or to route Copilot PRs through a path that re-writes commits with sign-off.
From what’s in
cert-manager/testingtoday, the “requirement” is coming from Tide queries that include the label"dco-signoff: yes"plus the org-wide Prowdcoplugin:What to change (actionable)
Option 1: Exempt Copilot PRs in Tide (most direct; no commit rewriting)
Add a Tide query entry matching the Copilot PR author but without
"dco-signoff: yes".Example (you will need to replace the author with the exact login Copilot uses in your PRs):
This makes Tide merge those PRs without DCO even though Prow will still apply
dco-signoff: no.You must confirm the author login Tide will match. It might be:
ThatsMrTalbot) if Copilot pushes as you,github-actions[bot]if it’s using a workflow token,If you want only Copilot PRs exempt (not all PRs by you), then you need a bot identity to match on, not your personal login.
Option 2: Keep DCO for humans, but create a “Copilot integration” branch policy
If you don’t want to exempt an author across all repos/branches, a pattern is:
copilot-staging(or similar) where DCO isn’t required in Tidemainwith sign-offThat’s more complex, but avoids weakening DCO on
main-bound PRs.Option 3: Turn off the Prow
dcoplugin (not sufficient by itself)Even if you remove
- dcofromconfig/plugins.yaml, Tide is still requiring the label"dco-signoff: yes"in `config/co...This pull request was created from Copilot chat.
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.