Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to skip building if there were no source code changes #113

Open
rkrisztian opened this issue Nov 17, 2017 · 1 comment
Open

Option to skip building if there were no source code changes #113

rkrisztian opened this issue Nov 17, 2017 · 1 comment

Comments

@rkrisztian
Copy link

rkrisztian commented Nov 17, 2017

My project wishes a "linear history" in Git for the reason described in this article. Therefore, they have set BitBucket to allows only the Fast-forward only merge strategy, which rejects a Pull Request if the source branch is out of date with the target branch. To fix the out-of-date problem you would have to rebase in Git to rewind your changes to the top of the history and do a forced push on the source branch. Usually this goes without conflicts, and with no soure code changes, but the gocd-build-github-pull-requests plugin will do a rebuild anyway. When combined with the GoCd build status notifier plugin, which is configured to require 1 successful build before a PR can be merged, this can greatly increase the time required for a successful merge.

Therefore, I would like to request an option to disable building PRs when they change but there were no actual source code changes. E.g. the Bitbucket Server Auto Unapprove Plugin already works in a similar way, that, you can rewind to top without automatically removing the approved statuses of reviewers.

I know that potentially every successful merge or rebase can do functional breakage in the build, but in our experience the probability of that is too low, thus not worth it for us, and we already have a CI/CD build that triggers after changes in the target branch.

This feature request may need changes in the notifier plugin as well, I don't know for sure.

Thanks in advance.

@ashwanthkumar
Copy link
Owner

@rkrisztian Would you be interested in sending a PR for this change? You might want to add a configuration in the plugin and check for it in this method. This was the default behavior of the plugin, but the community wanted to merge commits with no source file changes as well. So this can be an opt-in feature which can be enabled as seem fit for use-cases described above.

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

No branches or pull requests

2 participants