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

Add BHIsPullRequest #79

Open
SheepReaper opened this issue Oct 26, 2018 · 5 comments · May be fixed by #117
Open

Add BHIsPullRequest #79

SheepReaper opened this issue Oct 26, 2018 · 5 comments · May be fixed by #117

Comments

@SheepReaper
Copy link

Not sure if there is a reliable way to determine if a commit is a pull request from within all CI environments, but would like to see the option explored

Use case, I don't want to deploy on Pull requests, but I don't want disable the Pull webhook in GitHub

I have all my deploy logic in a psdeply script and would like to control deploy on pull request. Reason is appveyor does not resolve secrets on PR (for public repo anyways) and thus deploy can't work. (deploy to psgallery) <- I sometimes deploy stable (-dev##) versions to psgallery

Semi-unrelated: Is there a way to tell appveyor to not build a branch if there is a pull request open (I want to avoid the double build on PR update)

@FISHMANPET
Copy link
Contributor

Should probably be possible.
AppVeyor has 5 variables that get set in the case of a pull request.
Gitlab CI calls these merge requests and has a bunch of variables like CI_MERGE_REQUEST_* that are only present for a merge request
Jenkins will set CHANGE_ID if you're using the github plugins, though it may trigger when building a branch as well (this says it's only set for a pull request, this says it would be set for both a PR and building a different branch
TeamCity: what a disaster I have no idea...
Azure pipelines has Build_Reason which could be PullRequest.
Bamboo: I'm not sure bamboo even supports builds on pull requests...
GoCD: this appears to be the goto plugin for github pull requests and it sets a number of variables for PRs
Travis CI has TRAVIS_EVENT_TYPE which could be pull_request
Github Actions has GITHUB_EVENT_NAME which would be pull_request

@RamblingCookieMonster if you think this is useful I can give it a try, doesn't look like it should be too hard.

@FISHMANPET
Copy link
Contributor

well whatdya know, I now found myself needing to know if I'm in a PR or not, so I guess I'm gonna write this one too

@FISHMANPET
Copy link
Contributor

@bryan5989 what Ci system do you use?

@SheepReaper
Copy link
Author

SheepReaper commented Jun 14, 2019 via email

@FISHMANPET
Copy link
Contributor

Well that's two environments I don't use, so that'll be two more environments that some can actually validate

@FISHMANPET FISHMANPET linked a pull request Aug 8, 2019 that will close this issue
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 a pull request may close this issue.

2 participants