Skip to content

Commit a66f973

Browse files
committed
added comment triggers
1 parent 00cffa6 commit a66f973

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: PR keyword check
2+
on:
3+
workflow_dispatch:
4+
5+
# This workflow deliberately does nothing of value. The branch rules require the associated "Check PR issue comments for trigger keywords" job to have run before the PR being merged
6+
jobs:
7+
pr-keyword-check:
8+
runs-on: unity-linux-runner
9+
steps:
10+
- run: ls

.yamato/_triggers.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
# Focuses on critical validation paths that we should validate before merging PRs
1616
# Cancels previous runs on new commits
1717
# Excludes draft PRs
18+
# Excludes running when changes ONLY touching documentation files
19+
# Requires `/ci ngo` or `/ci ignore` comment to trigger the job. This was implemented and explained in https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/pull/3577
20+
1821

1922
# Nightly:
2023
# This test validates same subset as pull_request_trigger with addition of mobile/console tests and webgl builds
@@ -38,6 +41,18 @@
3841

3942
#-----------------------------------------------------------------------------------
4043

44+
# Gates the merger of PRs as a pre-requisite. Runs when `/ci ngo` or `/ci ignore` is present as an issue comment
45+
check_pr_issue_comments_for_trigger_keywords:
46+
name: Check PR issue comments for trigger keywords
47+
agent:
48+
type: Unity::github::action
49+
action_source: pr-keyword-check.yml
50+
triggers:
51+
expression: |-
52+
pull_request.comment eq "ngo" OR
53+
pull_request.comment eq "ignore"
54+
55+
4156
# Run all relevant tasks when a pull request targeting the develop or release branch is created or updated.
4257
# In order to have better coverage we run desktop standalone tests with different configurations which allows to mostly cover for different platforms, scripting backends and editor versions.
4358
# This job will FIRST run "run_quick_checks" jobs (defined in _run-all.yml) since it's the dependency of project pack jobs which is on the lowest dependency tier. This runs the fastest checks (like PVP or code standards) and ONLY IF those pass it will run the rest of the tests.
@@ -62,6 +77,7 @@ pull_request_trigger:
6277
triggers:
6378
cancel_old_ci: true
6479
expression: |-
80+
pull_request.comment eq "ngo" AND
6581
(pull_request.target eq "develop" OR
6682
pull_request.target eq "develop-2.0.0" OR
6783
pull_request.target match "/release\/.*/") AND

0 commit comments

Comments
 (0)