Skip to content

Restrict trigger push branch for GitHub Workflow#328

Merged
aherbert merged 1 commit into
apache:masterfrom
apupier:restrictTriggerPushForGitHubWorkflow
Jul 2, 2026
Merged

Restrict trigger push branch for GitHub Workflow#328
aherbert merged 1 commit into
apache:masterfrom
apupier:restrictTriggerPushForGitHubWorkflow

Conversation

@apupier

@apupier apupier commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Feature branches rarely need their own CI runs: the code is already tested when a pull request is opened against a release branch. If the push trigger has no branch restriction and pull_request is also configured, every push to a branch with an open PR runs the workflow twice: once for the push and once for the PR synchronisation.

Always give the push trigger an explicit list of branches: this stops branches created from a release branch from inheriting its workflow runs.

see https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=430408443#GitHubActionsRecommendedPractices-Restrictthepushtriggertospecificbranches

Feature branches rarely need their own CI runs: the code is already
tested when a pull request is opened against a release branch. If the
push trigger has no branch restriction and pull_request is also
configured, every push to a branch with an open PR runs the workflow
twice: once for the push and once for the PR synchronisation.

Always give the push trigger an explicit list of branches: this stops
branches created from a release branch from inheriting its workflow
runs.

see https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=430408443#GitHubActionsRecommendedPractices-Restrictthepushtriggertospecificbranches

Signed-off-by: Aurélien Pupier <apupier@ibm.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.19%. Comparing base (f554608) to head (5167a69).
⚠️ Report is 330 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #328      +/-   ##
============================================
+ Coverage     86.54%   87.19%   +0.64%     
+ Complexity     9787       89    -9698     
============================================
  Files           532      499      -33     
  Lines         35516    33463    -2053     
  Branches       6194     5833     -361     
============================================
- Hits          30738    29178    -1560     
+ Misses         3518     3158     -360     
+ Partials       1260     1127     -133     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aherbert aherbert merged commit 6418ae3 into apache:master Jul 2, 2026
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants