Skip to content

Allow auto-merge - Removed the conditional to allow the required check to run and not be skipped - #1030

Merged
stevepiercy merged 2 commits into
mainfrom
allow-auto-merge
Oct 22, 2026
Merged

stevepiercy merged 2 commits into
mainfrom
allow-auto-merge

Conversation

@stevepiercy

Copy link
Copy Markdown
Member

Closes #1029

- Removed the conditional to allow the required check to run and not be skipped
@stevepiercy

Copy link
Copy Markdown
Member Author

It's kinda silly that test has to run twice, but I don't see another way around this.

@stevepiercy
stevepiercy enabled auto-merge October 22, 2026 08:49
@stevepiercy stevepiercy moved this from New to In Progress in Plone Documentation Oct 22, 2026
@stevepiercy

Copy link
Copy Markdown
Member Author

The failed link check was a temporary timeout and be ignored. I restarted the run anyway.

@davisagli

Copy link
Copy Markdown
Member

It's kinda silly that test has to run twice, but I don't see another way around this.

You can configure the push trigger to only run for the main branch. (Then the tests won't run if someone pushes a branch without opening a PR, but maybe they shouldn't yet at that point.)

@stevepiercy

Copy link
Copy Markdown
Member Author

It's kinda silly that test has to run twice, but I don't see another way around this.

You can configure the push trigger to only run for the main branch. (Then the tests won't run if someone pushes a branch without opening a PR, but maybe they shouldn't yet at that point.)

I couldn't parse this. They shouldn't push to main or the tests shouldn't run? Tests should always run if someone bypasses a PR.

@davisagli

Copy link
Copy Markdown
Member

@stevepiercy I know we always want the tests to run for a push to main. What I meant was that we probably don't need to run them if someone creates and pushes a branch without creating a PR. So we could configure the triggers like this:

on:
  push:
    branches:
      - main
  pull_request:

(Trigger the workflow for all pull requests, and for pushes to the main branch only)

@stevepiercy

Copy link
Copy Markdown
Member Author

@davisagli done! Looks to work now.

@github-project-automation github-project-automation Bot moved this from In Progress to Approved in Plone Documentation Oct 22, 2026
@davisagli

Copy link
Copy Markdown
Member

@stevepiercy the auto-merge is not working. "Cannot update this protected ref."

@stevepiercy

Copy link
Copy Markdown
Member Author

@davisagli that's weird. Maybe this PR needs to be merged before it takes affect? I don't see anything in the repo settings that would prevent a merge.

@stevepiercy
stevepiercy disabled auto-merge October 22, 2026 21:51
@stevepiercy
stevepiercy enabled auto-merge October 22, 2026 21:57
@stevepiercy
stevepiercy disabled auto-merge October 22, 2026 21:57
@stevepiercy

Copy link
Copy Markdown
Member Author

Yeah, I double-checked the repo's branch protection settings for main, and there's nothing that would prevent it.

https://github.com/plone/training/settings/branch_protection_rules/24686927

  • It's a pull request
  • It's got at least 1 approval
  • You approved the most recent push
  • The status checks pass [I think this is what blocks it, maybe a chicken-and-egg thing.]
  • The branch is up to date.
  • There are no conversations to resolve.
  • I'm an Owner.

I had to remove the auto-merge, check "Merge without waiting for requirements to be met (bypass rules)", then "Bypass rules and merge". I guess we'll see if it works next time.

@stevepiercy
stevepiercy merged commit 9c3ba5b into main Oct 22, 2026
2 checks passed
@stevepiercy
stevepiercy deleted the allow-auto-merge branch October 22, 2026 22:01
@github-project-automation github-project-automation Bot moved this from Approved to Done in Plone Documentation Oct 22, 2026
@davisagli

Copy link
Copy Markdown
Member

@stevepiercy You were only looking at the (old) branch protection rule feature, but there's also (newer) Rulesets: https://github.com/plone/training/settings/rules

The problem might be in this ruleset: https://github.com/plone/training/settings/rules/20865105

It has "restrict updates" checked (Only allow users with bypass permissions to update matching refs.) but the bypass list is set to Repository admin, and I do not have the admin role at the repository level (even though I'm an Owner at the organization level). https://github.com/plone/training/settings/access shows that the documentation team has the admin role, but I'm not in that team. I'm happy to join it, if you think that's the easiest way to resolve this.

But I'm not really sure that's the explanation...it seems weird that my permissions would be the problem when you're the one who implemented the PR and clicked auto-merge.

@stevepiercy

Copy link
Copy Markdown
Member Author

Oops, yeah, wrong link. I purged the old rules just in case they conflicted with the new, although they should have been identical.

I sent you invitations to both the docs and trainers teams. You write plenty of docs and encourage others to write them when they omit them, which is the primary function that a member of the docs team does. 😜

I can't explain it either. Definitely weird. ¯\_(ツ)_/¯

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Allow auto-merge of PRs

2 participants