Skip to content

Commit 4382738

Browse files
authored
Added status check and watch check (Azure#35912)
1 parent 8547165 commit 4382738

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "[TEST-IGNORE] Breaking Change(Cross-Version) - Set Status"
2+
3+
on:
4+
# Must run on pull_request_target instead of pull_request, since the latter cannot trigger on
5+
# labels from bot accounts in fork PRs. pull_request_target is also more similar to the other
6+
# trigger "workflow_run" -- they are both privileged and run in the target branch and repo --
7+
# which simplifies implementation.
8+
pull_request_target:
9+
types:
10+
# Run workflow on default types, to update status as quickly as possible.
11+
- opened
12+
- synchronize
13+
- reopened
14+
# Depends on labels, so must re-evaluate whenever a relevant label is manually added or removed.
15+
- labeled
16+
- unlabeled
17+
workflow_run:
18+
workflows: ["\\[TEST-IGNORE\\] Breaking Change(Cross-Version) - Analyze Code"]
19+
types: [completed]
20+
21+
permissions:
22+
actions: read
23+
contents: read
24+
issues: read
25+
pull-requests: read
26+
statuses: write
27+
28+
jobs:
29+
breaking-change-cross-version-status:
30+
name: Set Breaking Change(Cross-Version) Status
31+
uses: ./.github/workflows/_reusable-set-check-status.yaml
32+
with:
33+
monitored_workflow_name: "[TEST-IGNORE] Breaking Change(Cross-Version) - Analyze Code"
34+
required_check_name: "[TEST-IGNORE] Breaking Change(Cross-Version)"
35+
overriding_label: "BreakingChange-Approved-Benign,BreakingChange-Approved-BugFix,BreakingChange-Approved-UserImpact,BreakingChange-Approved-BranchPolicyException,BreakingChange-Approved-Previously,BreakingChange-Approved-Security,Versioning-Approved-Benign,Versioning-Approved-BugFix,Versioning-Approved-PrivatePreview,Versioning-Approved-BranchPolicyException,Versioning-Approved-Previously,Versioning-Approved-Retired"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use ~ to sort the workflow to the bottom of the list
2+
name: "~Watch - Breaking Change(Cross-Version)"
3+
4+
on:
5+
# check_suite is preferred over check_run to avoid triggering on all check
6+
# runs. In some cases, check_run must be used in testing environments.
7+
check_suite:
8+
types: completed
9+
10+
workflow_run:
11+
types: completed
12+
workflows:
13+
- "\\[TEST-IGNORE\\] Breaking Change(Cross-Version) - Set Status"
14+
15+
permissions:
16+
checks: read
17+
contents: read
18+
19+
jobs:
20+
BreakingChangeCrossVersion:
21+
name: Watch Breaking Change(Cross-Version)
22+
uses: ./.github/workflows/_reusable-verify-run-status.yaml
23+
with:
24+
check_run_name: "Breaking Change(Cross-Version)"
25+
commit_status_name: "[TEST-IGNORE] Breaking Change(Cross-Version)"

0 commit comments

Comments
 (0)