Skip to content

Only one of AI- label can be added - #723

Merged
Mariatta merged 3 commits into
python:mainfrom
Mariatta:ai-label-exclusive
Oct 28, 2026
Merged

Mariatta merged 3 commits into
python:mainfrom
Mariatta:ai-label-exclusive

Conversation

@Mariatta

Copy link
Copy Markdown
Member

When a PR/an issue moves from AI-needs-explanation to AI-guidelines-not-met, triagers would need to first remove the needs-explanation label and add the guidelines-not-met label. With this PR, triager can add the guidelines-not-met label and the bot automatically removes the first label. If both labels are added at the same time, the guidelines-not-met label wins.

Note that this only works on PR/issues that are still open. If the labels are added to closed items, the bot doesn't act.

Adding AI-guidelines-not-met removes AI-needs-explanation, so triagers
no longer have to remove the first label by hand. When both labels are
added together, the close label wins and the explanation handler steps
aside, so only one comment is posted and only one label is removed.
@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7a958e0) to head (dcb6d69).

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #723   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines         2370      2421   +51     
  Branches       117       119    +2     
=========================================
+ Hits          2370      2421   +51     
Flag Coverage Δ
Python_3.14.9 100.00% <100.00%> (ø)
Python_3.15.1 100.00% <100.00%> (?)
Python_3.15.2 ?

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

Files with missing lines Coverage Δ
bedevere/policy.py 100.00% <100.00%> (ø)
tests/test_policy.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Also state in the README that adding AI-needs-explanation to an item
that already has AI-guidelines-not-met does nothing.

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@Mariatta
Mariatta merged commit 7befc07 into python:main Oct 28, 2026
7 checks passed
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.

2 participants