GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CI: Do not allow merge if labelled DO-NOT-MERGE by hugovk · Pull Request #103337 · python/cpython

Conversation

@hugovk

@hugovk hugovk commented Apr 7, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

For python/core-workflow#498.

Before switching to GitHub's own auto-merge, we need to make sure it respects the DO-NOT-MERGE label.

We can use https://github.com/mheap/github-action-required-labels to prevent merge if a label exists. We will set this new check as required, and it only passes when DO-NOT-MERGE is absent.

Docs: https://github.com/mheap/github-action-required-labels#prevent-merging-if-a-label-exists

This will also disable the merge button for PRs with DO-NOT-MERGE , regardless of using GitHub auto-merge, which will also help avoid accidental merges.

TODO

  • Bikeshed on workflow filename and name:
  • Org admin: in the branch protection rules (for all branches with rules), set this new check as required
  • Include GitHub auto-merge in the label description at https://devguide.python.org/triage/labels/#labels-specific-to-prs

Demo

In my fork, I've set the check to required and created a demo PR: hugovk#47

No label: can merge

image

With label: cannot merge

image

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hugovk
CI: Do not allow merge if labelled DO-NOT-MERGE
176bed1
@hugovk
hugovk requested a review from ezio-melotti as a code owner April 7, 2023 09:00
@bedevere-bot bedevere-bot added the awaiting core review label Apr 7, 2023
@hugovk hugovk added skip issue skip news labels Apr 7, 2023
@hugovk hugovk mentioned this pull request Apr 7, 2023
Consider switching to native GitHub automerge python/core-workflow#498
Closed
pradyunsg
pradyunsg approved these changes Apr 7, 2023
View reviewed changes
Comment thread .github/workflows/require-pr-label.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Apr 7, 2023
sobolevn
sobolevn reviewed Apr 7, 2023
View reviewed changes

@sobolevn sobolevn left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good!
Require PR label seems like an odd name for this workflow, though.

Maybe it can be more generic like Check PR labels?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread .github/workflows/require-pr-label.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Mariatta
Mariatta reviewed Apr 7, 2023
View reviewed changes
Comment thread .github/workflows/require-pr-label.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

CAM-Gerlach
CAM-Gerlach reviewed Apr 8, 2023
View reviewed changes

@CAM-Gerlach CAM-Gerlach left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Great idea overall; I'd been wanting to add something like this for a while now. We should probably backport this at least to 3.11, since automerge functionality is particularly common on auto-backport PRs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .github/workflows/require-pr-label.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/require-pr-label.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/require-pr-label.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@hugovk hugovk added the needs backport to 3.11 only security fixes label Apr 8, 2023
@hugovk @CAM-Gerlach
Rename workflow and step, update action
652de6c
Co-authored-by: C.A.M. Gerlach <[email protected]>
sobolevn
sobolevn approved these changes Apr 8, 2023
View reviewed changes

@sobolevn sobolevn left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM 👍

Shout out to @mheap for developing this useful GH action 👋

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk and mheap reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
CAM-Gerlach
CAM-Gerlach approved these changes Apr 9, 2023
View reviewed changes

@CAM-Gerlach CAM-Gerlach left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM now, thanks @hugovk !

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hugovk
hugovk merged commit 090e26e into python:main Apr 9, 2023
@miss-islington

miss-islington commented Apr 9, 2023

Copy link
Copy Markdown
Contributor

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
hugovk deleted the do-not-merge-if-do-not-merge-label branch April 9, 2023 06:39
@bedevere-bot bedevere-bot removed the awaiting merge label Apr 9, 2023
@bedevere-bot

bedevere-bot commented Apr 9, 2023

Copy link
Copy Markdown

GH-103393 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Apr 9, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 9, 2023
@hugovk @CAM-Gerlach @miss-islington
CI: Do not allow merge if labelled DO-NOT-MERGE (pythonGH-103337)
0571c01
(cherry picked from commit 090e26e)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: C.A.M. Gerlach <[email protected]>
miss-islington added a commit that referenced this pull request Apr 9, 2023
@miss-islington @hugovk @CAM-Gerlach
CI: Do not allow merge if labelled DO-NOT-MERGE (GH-103337)
da3b77b
(cherry picked from commit 090e26e)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: C.A.M. Gerlach <[email protected]>
warsaw pushed a commit to warsaw/cpython that referenced this pull request Apr 11, 2023
@hugovk @CAM-Gerlach @warsaw
CI: Do not allow merge if labelled DO-NOT-MERGE (python#103337)
4a05ad3
Co-authored-by: C.A.M. Gerlach <[email protected]>
@hugovk hugovk mentioned this pull request Apr 20, 2023
[3.10] CI: Do not allow merge if labelled DO-NOT-MERGE (GH-103337) #103641
Closed
@bedevere-bot

bedevere-bot commented Apr 20, 2023

Copy link
Copy Markdown

GH-103641 is a backport of this pull request to the 3.10 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@arhadthedev arhadthedev mentioned this pull request Apr 24, 2023
Remove 🤖 automerge #103739
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Mariatta Mariatta Mariatta left review comments
@pradyunsg pradyunsg pradyunsg approved these changes
@sobolevn sobolevn sobolevn approved these changes
@CAM-Gerlach CAM-Gerlach CAM-Gerlach approved these changes
@ezio-melotti ezio-melotti Awaiting requested review from ezio-melotti ezio-melotti is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@hugovk @miss-islington @bedevere-bot @pradyunsg @sobolevn @Mariatta @CAM-Gerlach
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.