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

{CI} Update bot workflow #7091

Merged
merged 7 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5729,6 +5729,8 @@ configuration:
reviewer: zhoxing-ms
- requestReview:
reviewer: yanzhudd
- requestReview:
reviewer: qwuae1
- addLabel:
label: Auto-Assign
- assignTo:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/AddIssueComment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Say thanks for the Issue
steps:
- name: comment on the issue
uses: hasura/comment-progress@v2.2.0
uses: hasura/comment-progress@v2.3.0
with:
github-token: ${{ secrets.CLI_BOT }}
repository: 'Azure/azure-cli-extensions'
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/BlockPRMerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Block PR merging on "do-not-merge" label

on:
pull_request_target:
types: [labeled, unlabeled]

jobs:
block-merge:
runs-on: ubuntu-latest
steps:
- name: Check "do-not-merge" label
uses: actions/github-script@v7
with:
script: |
const labels = context.payload.pull_request.labels.map(label => label.name);
if (labels.includes("do-not-merge")) {
console.log("It is not allowed to merge a PR with 'do-not-merge' label.");
process.exit(1); // Exit with a non-zero status code to block merge
} else {
console.log("It is allowed to merge a PR without 'do-not-merge' label.");
}