Skip to content

add workflow Block PRs with "NO-MERGE" label #13486

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Epica3055
Copy link
Member

@Epica3055 Epica3055 commented May 20, 2025

Sometime we don't want to merge a PR until a latter time. So we add a NO-MERGE label to indicate that. but we may accidentally click it. 🤣

So add a workflow to block PRs with "NO-MERGE" label.

To make it work, I think we need to configure it after this is merged, which I think I don't have the privilege to do so.
image

@Epica3055 Epica3055 marked this pull request as ready for review May 21, 2025 02:31
@Epica3055 Epica3055 requested a review from a team as a code owner May 21, 2025 02:31
Copy link
Member

@LeafShi1 LeafShi1 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a GitHub Actions workflow to block pull requests that contain the "NO-MERGE" label.

  • Introduces a new workflow file (.github/workflows/block-PR-with-no-merge-label.yml) that triggers on PR events.
  • Implements a check step using actions/github-script to fail the build if the label is present.
Comments suppressed due to low confidence (1)

.github/workflows/block-PR-with-no-merge-label.yml:18

  • The script uses 'core.setFailed' without importing or defining 'core'. Consider initializing core (e.g., with const core = require('@actions/core');) or using a supported method in github-script to fail the action.
core.setFailed("This pull request has a NO-MERGE label and cannot be merged.");

@Epica3055 Epica3055 removed the draft draft PR label May 21, 2025
@KlausLoeffelmann
Copy link
Member

@Shyam-Gupta, do you want to take a quick look?

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

Successfully merging this pull request may close these issues.

3 participants