RegistryCI.jl icon indicating copy to clipboard operation
RegistryCI.jl copied to clipboard

add `AutoMerge: last run blocked by comment` and `Override AutoMerge: ignore blocking comments` labels

Open ericphanson opened this issue 1 year ago • 3 comments

This is the first RegistryCI feature that involves adding/removing labels programatically, as opposed to previous work that only reads them. This only affects the cron job. When it runs, it

  1. Checks if the label "AutoMerge: last run blocked by comment" exists. If not it creates it. This will require new permissions, so this change is likely breaking
  2. For each PR, if the PR has the label "Override AutoMerge: ignore blocking comments" then the PR does not count as blocked
  3. if a PR is blocked, the label "Override AutoMerge: ignore blocking comments" is added (again, this needs new permissions)
  4. if a PR is not blocked, the label "Override AutoMerge: ignore blocking comments" is removed (again, permissions)

Specifically, the permissions needed are: the github token by the cron job needs at least one of:

  • "Issues" repository permissions (write)
  • "Pull requests" repository permissions (write)

ericphanson avatar Aug 07 '24 22:08 ericphanson

Unit tests on Julia 1.3 should be fixed now after https://github.com/JuliaRegistries/General/pull/112623. I'll retry that job.

DilumAluthge avatar Aug 08 '24 01:08 DilumAluthge

Is there a way to try the integration tests without merging?

ericphanson avatar Aug 08 '24 09:08 ericphanson

We could add a workflow_dispatch trigger to the integration tests, which would allow us to trigger them manually.

DilumAluthge avatar Aug 08 '24 13:08 DilumAluthge

All of this work is done in the cron job, right? This doesn't change anything in the PR job?

I haven't done a line-by-line review of the code, but at a high level, I understand the motivation here:

  1. Increase the visibility (to the PR author) when a PR is blocked by blocking comments.
  2. Give registry triagers the ability to override blocking comments.

DilumAluthge avatar Oct 21 '24 23:10 DilumAluthge

Yep, exactly. The “blocked” label is intended to be managed entirely by the cron job to communicate status, and is set and removed by it. If a human adds or removes it, it will just be corrected next cron run to surface the actual status.

The override label is never set or removed by the cron job, only read. It allows ignoring blocking comments; it’s easier than editing “noblock” into every comment, and it allows triage members to overrule community blocks if necessary.

I hope these have the following effects:

  • package authors can understand more easily when their PR is blocked (maybe even by their own comments)
  • One can tell without even clicking into a PR which ones are blocked, or filter PRs by blocked/unblocked ones for an easier overview
  • Triage members have a new tool for moderation/maintence that makes things slightly easier.

ericphanson avatar Oct 22 '24 00:10 ericphanson

Those details sound good to me.

DilumAluthge avatar Oct 22 '24 01:10 DilumAluthge

ok, think this is ready to go. I believe it is non-breaking, since while it needs write permissions for the PR, it is part of the cron job which needs merging permissions anyway. It does not add or remove labels in read_only mode.

ericphanson avatar Oct 22 '24 21:10 ericphanson