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

Do not build virtual merge on Pull Requests #1636

Open
IlyaFinkelshteyn opened this Issue Jul 1, 2017 · 12 comments

Comments

Projects
None yet
5 participants

@IlyaFinkelshteyn IlyaFinkelshteyn self-assigned this Jul 1, 2017

@minggo

This comment has been minimized.

Copy link

minggo commented Jul 18, 2017

I think you can disable the building for PR by adding skip_branch_with_pr: true

@IlyaFinkelshteyn

This comment has been minimized.

Copy link
Member Author

IlyaFinkelshteyn commented Jul 19, 2017

@minggo skip_branch_with_pr: true does not prevent virtual merge to master to be build when PR is created

@sschuberth

This comment has been minimized.

Copy link

sschuberth commented Dec 5, 2017

Actually, I think it would be nice if it was completely configurable for a PR whether you want to build only the source branch of the PR, only the "virtual" merge with the target branch, or both. Maybe some configuration setting like this:

pr_builds:
  source_branch: {true|false}
  target_merge: {true|false}
@IlyaFinkelshteyn

This comment has been minimized.

Copy link
Member Author

IlyaFinkelshteyn commented Dec 5, 2017

@sschuberth Note that if you disable Pull request in GitHub webhook settings, virtual merge does not happen. This issue is mostly about to make the same in YAML (so have all settings in one place), but right now it is doable with altering GitHub webhook too.

@sschuberth

This comment has been minimized.

Copy link

sschuberth commented Dec 5, 2017

Ah, thanks @IlyaFinkelshteyn for pointing out to configure this via GitHub's web interface. It seems this would also allow to only build the virtual merge by only leaving the "Pull request" event checked.

@IlyaFinkelshteyn

This comment has been minimized.

Copy link
Member Author

IlyaFinkelshteyn commented Dec 5, 2017

@sschuberth AppVeyor starts building virtual merge when it receives PR webhook. If this webhook is not being sent, nothing happens. Normal pushes to the feature branch will still be built, because Push is still checked and webhook is being sent fro them.

@sschuberth

This comment has been minimized.

Copy link

sschuberth commented Dec 5, 2017

Thanks for the clarification!

@smtakeda

This comment has been minimized.

Copy link

smtakeda commented Feb 9, 2018

+1 for adding "Not run test for PR" option unless the secure file can be decrypted in PR: https://www.appveyor.com/docs/how-to/secure-files/

Note that file won’t be decrypted on Pull Request builds as secure variables are not set during PR build.

Since our builds use an encrypted file, PR build always fails.
snowflakedb/libsnowflakeclient#22

@IlyaFinkelshteyn

This comment has been minimized.

Copy link
Member Author

IlyaFinkelshteyn commented Feb 9, 2018

@smtakeda Secure files use feature directly depends on secure variables. You can enable secure variables in Pull Requests in Project General Setting (UI only) -- for branches in the same repository only if your project is open source projects, and for branches in any repository if your project is private.

I see that your PR if from branch in the same public repo, so you just need to check Enable secure variables in Pull Requests from the same repository only in UI.

@smtakeda

This comment has been minimized.

Copy link

smtakeda commented Feb 9, 2018

@IlyaFinkelshteyn, ah, thank you! It worked now!

@nealkruis

This comment has been minimized.

Copy link

nealkruis commented Jun 20, 2018

@IlyaFinkelshteyn you said:

Note that if you disable Pull request in GitHub webhook settings, virtual merge does not happen. This issue is mostly about to make the same in YAML (so have all settings in one place), but right now it is doable with altering GitHub webhook too.

I haven't been able to find where to change this setting. Is there an option in the GitHub interface, or must this be set through the API?

@nealkruis

This comment has been minimized.

Copy link

nealkruis commented Jun 20, 2018

Never mind. I found it under repository settings (I was searching under user/organization settings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment