tag:help.appveyor.com,2012-11-13:/discussions/problems/24694-incorrect-branch-on-webhook-triggered-buildAppVeyor: Discussion 2019-10-12T21:01:24Ztag:help.appveyor.com,2012-11-13:Comment/475085672019-08-07T20:44:01Z2019-08-07T20:44:02ZIncorrect branch on webhook triggered build<div><p>Just as an update, it is readying the allowed branches from the appveyor.yml file, not from the website as I mentioned above. I removed an allowed branch from the website but left it in the appveyor.yml file (which is configured as an external URL), and a change to that branch still triggered a build, albeit still on the wrong branch.</p></div>benjamintag:help.appveyor.com,2012-11-13:Comment/475085672019-08-08T02:33:26Z2019-08-08T02:33:26ZIncorrect branch on webhook triggered build<div><p>Project is set up as a generic Git. Webhook payload for generic Git is not compatible with BitBucket. I am actually surprised it even started the build, it is probably compatible enough for that, but branch is not being parsed. Also generic Git does not support <code>appveyor.yml</code>, as described <a href="https://www.appveyor.com/docs/build-configuration/#generic-git-repositories-and-yaml">here</a>.</p>
<p>Maybe you can add repository owner as a <a href="https://www.appveyor.com/docs/team-setup/#user">user</a> with Administrator role to the AppVeyor account and ask him to authorize Bitbucket at <a href="https://ci.appveyor.com/account/Proworks/authorizations">https://ci.appveyor.com/account/Proworks/authorizations</a>. Thus OAuth token would be created and you will be able to re-create that project as a true Bitbucket one?</p>
<p>Or other way around -- repo owner creates own AppVeyor account add adds you with some the <a href="https://www.appveyor.com/docs/team-setup/#role">role</a> with enough permissions?</p>
<p>Regardless of approach, I would strongly recommend set this project as a Bitbucket ones. This has a lot of benefits, including Pull requests builds.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/475085672019-08-12T14:52:14Z2019-08-12T14:52:14ZIncorrect branch on webhook triggered build<div><p>Can you provide documentation on what the webhook is looking for in the payload to determine branch? I can create my own microservice that receives the BitBucket webhook and sends a request to the AppVeyor webhook, I just need to know which format it needs to correctly parse the branch. Is it looking for a Github webhook request, or some other format?</p></div>benjamintag:help.appveyor.com,2012-11-13:Comment/475085672019-08-12T17:58:52Z2019-08-12T17:58:52ZIncorrect branch on webhook triggered build<div><p>Sure: <a href="https://gist.github.com/FeodorFitsner/c1056be9152402918874">git webhook payload</a></p></div>Ilya Finkelshteyn