Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 18 commits into from
Oct 24, 2024

Conversation

ericphanson
Copy link
Member

@ericphanson ericphanson commented Aug 7, 2024

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)

@DilumAluthge
Copy link
Member

Unit tests on Julia 1.3 should be fixed now after JuliaRegistries/General#112623. I'll retry that job.

@ericphanson
Copy link
Member Author

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

@DilumAluthge
Copy link
Member

DilumAluthge commented Aug 8, 2024

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

@DilumAluthge
Copy link
Member

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.

@ericphanson
Copy link
Member Author

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.

@DilumAluthge
Copy link
Member

Those details sound good to me.

DilumAluthge
DilumAluthge previously approved these changes Oct 22, 2024
Copy link
Member

@DilumAluthge DilumAluthge left a comment

Choose a reason for hiding this comment

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

I have not reviewed the code diff line-by-line, but the high-level plan sounds good to me.

@ericphanson
Copy link
Member Author

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.

DilumAluthge
DilumAluthge previously approved these changes Oct 23, 2024
sleep(1)
# Check we no longer have the blocked label
labels = GitHub.labels(repo, pr)
@test !AutoMerge.has_label(labels, AutoMerge.BLOCKED_LABEL)
Copy link
Member Author

Choose a reason for hiding this comment

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

@ericphanson ericphanson added this pull request to the merge queue Oct 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 24, 2024
@ericphanson ericphanson added this pull request to the merge queue Oct 24, 2024
Merged via the queue into master with commit b98432d Oct 24, 2024
11 checks passed
@ericphanson ericphanson deleted the eph/cron-labels branch October 24, 2024 23:35
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