You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ppkarwasz (via GitHub)" <gi...@apache.org> on 2026/03/30 17:16:23 UTC
[PR] Run build only on `master` and PRs [commons-release-plugin]
ppkarwasz opened a new pull request, #423:
URL: https://github.com/apache/commons-release-plugin/pull/423
When a PR is created from a branch in the same repository, workflows run twice: once on `push` and once on `pull_request`.
This change fixes it, by only running workflows:
- On a direct push to `master`,
- On a Pull Request, regardless of the origin.
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Run build only on `master` and PRs [commons-release-plugin]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on code in PR #423:
URL: https://github.com/apache/commons-release-plugin/pull/423#discussion_r3023482925
##########
.github/workflows/maven.yml:
##########
@@ -15,7 +15,11 @@
name: Java CI
-on: [push, pull_request]
+on:
+ push:
+ branches:
+ - "master"
+ pull_request: {}
Review Comment:
What's the difference between '{}' and nothing like in https://github.com/apache/logging-log4j2/blob/2.x/.github/workflows/build.yaml ?
##########
.github/workflows/maven.yml:
##########
@@ -15,7 +15,11 @@
name: Java CI
-on: [push, pull_request]
+on:
+ push:
+ branches:
+ - "master"
Review Comment:
The GH docs use single quotes.
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Run build only on `master` and PRs [commons-release-plugin]
Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on code in PR #423:
URL: https://github.com/apache/commons-release-plugin/pull/423#discussion_r3032330148
##########
.github/workflows/maven.yml:
##########
@@ -15,7 +15,11 @@
name: Java CI
-on: [push, pull_request]
+on:
+ push:
+ branches:
+ - "master"
Review Comment:
I changed it in https://github.com/apache/commons-release-plugin/pull/423/commits/e2f5043555986198ee6e888a67a3b1867be3822b
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Run build only on `master` and PRs [commons-release-plugin]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on code in PR #423:
URL: https://github.com/apache/commons-release-plugin/pull/423#discussion_r3023479717
##########
.github/workflows/maven.yml:
##########
@@ -15,7 +15,11 @@
name: Java CI
-on: [push, pull_request]
+on:
+ push:
+ branches:
+ - "master"
Review Comment:
The GH docs use single quotes, shouldn't we do so here as well?
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Run build only on `master` and PRs [commons-release-plugin]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on code in PR #423:
URL: https://github.com/apache/commons-release-plugin/pull/423#discussion_r3030071488
##########
.github/workflows/maven.yml:
##########
@@ -15,7 +15,11 @@
name: Java CI
-on: [push, pull_request]
+on:
+ push:
+ branches:
+ - "master"
Review Comment:
I would change to single quotes because it matches the examples on https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Run builds only on push to `master` and pull requests [commons-release-plugin]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory merged PR #423:
URL: https://github.com/apache/commons-release-plugin/pull/423
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Run build only on `master` and PRs [commons-release-plugin]
Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on code in PR #423:
URL: https://github.com/apache/commons-release-plugin/pull/423#discussion_r3030072271
##########
.github/workflows/maven.yml:
##########
@@ -15,7 +15,11 @@
name: Java CI
-on: [push, pull_request]
+on:
+ push:
+ branches:
+ - "master"
+ pull_request: {}
Review Comment:
GitHub treats and empty object `{}` and nothing (interpreted as `null`) the same way.
I prefer `{}`, because it immediately shows that the value is empty and I don't have to check a couple of lines down (blank lines are ignored).
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Run build only on `master` and PRs [commons-release-plugin]
Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on code in PR #423:
URL: https://github.com/apache/commons-release-plugin/pull/423#discussion_r3030057917
##########
.github/workflows/maven.yml:
##########
@@ -15,7 +15,11 @@
name: Java CI
-on: [push, pull_request]
+on:
+ push:
+ branches:
+ - "master"
Review Comment:
That is a question of style: `master`, `'master'` and `"master"` are equivalent in this case.
Should I change it to `'master'`?
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org