imbajin commented on code in PR #2984:
URL: https://github.com/apache/hugegraph/pull/2984#discussion_r3052598165
##########
.github/workflows/rerun-ci.yml:
##########
@@ -0,0 +1,36 @@
+name: "Rerun CI"
+
+on:
+ workflow_run:
+ workflows:
+ - "HugeGraph-Server CI"
+ - "HugeGraph-Commons CI"
+ - "HugeGraph-PD & Store & Hstore CI"
+ - "Cluster Test CI"
+ types:
+ - completed
+
+permissions:
+ actions: write
+ contents: read
+
+jobs:
+ rerun-failed-jobs:
Review Comment:
⚠️ This also matches manually dispatched `HugeGraph-Commons CI` runs,
because `workflow_run` does not filter on the source event unless we do it
explicitly. That means a maintainer debugging a manual run can unexpectedly
burn a second run here. Please gate the auto-rerun to the PR/push paths we
actually want to heal.
```suggestion
if: >-
github.event.workflow_run.conclusion == 'failure' &&
contains(fromJSON('["push","pull_request"]'),
github.event.workflow_run.event) &&
fromJSON(github.event.workflow_run.run_attempt) < 2
```
##########
.github/workflows/rerun-ci.yml:
##########
@@ -0,0 +1,36 @@
+name: "Rerun CI"
+
+on:
+ workflow_run:
Review Comment:
⚠️ `workflow_run` is a privileged trigger, but this controller currently
fires for failed runs on any target branch. Because the source workflows use
bare `pull_request`, a PR opened against an ad-hoc maintenance/experiment
branch would also execute this write-scoped workflow. Can we narrow the trigger
surface to the supported branches here as well?
```suggestion
on:
workflow_run:
workflows:
- "HugeGraph-Server CI"
- "HugeGraph-Commons CI"
- "HugeGraph-PD & Store & Hstore CI"
- "Cluster Test CI"
types:
- completed
branches:
- master
- 'release-*'
- 'test-*'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]