{"action":"created","issue":{"url":"https://api.github.com/repos/buildbot/buildbot/issues/4221","repository_url":"https://api.github.com/repos/buildbot/buildbot","labels_url":"https://api.github.com/repos/buildbot/buildbot/issues/4221/labels{/name}","comments_url":"https://api.github.com/repos/buildbot/buildbot/issues/4221/comments","events_url":"https://api.github.com/repos/buildbot/buildbot/issues/4221/events","html_url":"https://github.com/buildbot/buildbot/issues/4221","id":342926070,"node_id":"MDU6SXNzdWUzNDI5MjYwNzA=","number":4221,"title":"Specify a branch for a Git step","user":{"login":"wrosecrans","id":508982,"node_id":"MDQ6VXNlcjUwODk4Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/508982?v=4","gravatar_id":"","url":"https://api.github.com/users/wrosecrans","html_url":"https://github.com/wrosecrans","followers_url":"https://api.github.com/users/wrosecrans/followers","following_url":"https://api.github.com/users/wrosecrans/following{/other_user}","gists_url":"https://api.github.com/users/wrosecrans/gists{/gist_id}","starred_url":"https://api.github.com/users/wrosecrans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrosecrans/subscriptions","organizations_url":"https://api.github.com/users/wrosecrans/orgs","repos_url":"https://api.github.com/users/wrosecrans/repos","events_url":"https://api.github.com/users/wrosecrans/events{/privacy}","received_events_url":"https://api.github.com/users/wrosecrans/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-19T23:45:53Z","updated_at":"2018-07-20T18:22:30Z","closed_at":null,"author_association":"NONE","body":"The Git buildstep allows you to pass a default branch, and if a user does a force-build, it will override the default branch.  Is there any way to prevent this?\r\n\r\nI often want to use jobs with multiple Git steps where there is one repo for the source that should use the branch specified in the force build, but then other stuff should just use whatever branch I specify when I set up the builder, no matter what.  How can I set a specific branch for the Git step, rather than merely a default branch if nothing else is specified?"},"comment":{"url":"https://api.github.com/repos/buildbot/buildbot/issues/comments/406686779","html_url":"https://github.com/buildbot/buildbot/issues/4221#issuecomment-406686779","issue_url":"https://api.github.com/repos/buildbot/buildbot/issues/4221","id":406686779,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjY4Njc3OQ==","user":{"login":"wrosecrans","id":508982,"node_id":"MDQ6VXNlcjUwODk4Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/508982?v=4","gravatar_id":"","url":"https://api.github.com/users/wrosecrans","html_url":"https://github.com/wrosecrans","followers_url":"https://api.github.com/users/wrosecrans/followers","following_url":"https://api.github.com/users/wrosecrans/following{/other_user}","gists_url":"https://api.github.com/users/wrosecrans/gists{/gist_id}","starred_url":"https://api.github.com/users/wrosecrans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrosecrans/subscriptions","organizations_url":"https://api.github.com/users/wrosecrans/orgs","repos_url":"https://api.github.com/users/wrosecrans/repos","events_url":"https://api.github.com/users/wrosecrans/events{/privacy}","received_events_url":"https://api.github.com/users/wrosecrans/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T18:22:30Z","updated_at":"2018-07-20T18:22:30Z","author_association":"NONE","body":"That's...  a little counterintuitive, since my branch isn't guaranteed to be the latest, but I just did a test with that in my config and it seems to work.\r\n\r\nI can check out a main repo, get a JSON file and parse it, and then use the contents to optionally  step.build.addStepsAfterCurrentStep() a step to get something from another repo specified in the JSON.  In my case, I am using it to grab a Dockerfile that will be used to build the source in the first repo.  If I run into problems with it, I'll fall back to mv740's suggestion of just ignoring the Git step and doing it as a shell command instead."}}
{"actor":{"display_login":"wrosecrans"}}