Bitrise is selecting the incorrect target branch (from a pull request on GitHub) in one of my projects

Description of the issue

Bitrise is selecting the incorrect target branch (from a pull request on GitHub) in one of my projects

Bitrise is setup with a pull request trigger: source branch (*), target branch (gh-pages). Target branch is correct on github but is not being picked up correctly on bitrise.

Works fine on the second project but my primary project showed the merge branch twice, rather than the target branch, as a result my default pull request trigger workflow is running.

1 Like

Hi @termorrell,

Can you please copy paste just the trigger_map from your bitrise.yml / config? From the app where it doesn’t work as expected.

(You can find the bitrise.yml in the Workflow Editor of the app -> switch to the bitrise.yml tab in the editor).

trigger_map:
- pull_request_target_branch: gh-pages
  workflow: gh-pages
- pull_request_source_branch: "*"
  pull_request_target_branch: "*"
  workflow: build-all
- push_branch: gh-pages
  workflow: gh-pages
- push_branch: master
  workflow: deploy-all-to-fabric
1 Like

Reading this again, it might be that you use the old, now deprecated webhook endpoint.

Can you please check the bitrise.io webhook on GitHub? It should start with hooks.bitrise.io/h/..., if it starts with bitrise.io/hook (without the hooks. sub domain in the URL) please replace that with the new one, which you can find on the Code tab of the app.

Related docs: http://devcenter.bitrise.io/webhooks/troubleshooting/

Initially we had a non open source bitrise.io/hooks endpoint for webhooks, but every new project registered should now get the new hooks.bitrise.io webhook URL automatically.

Thanks for sharing the trigger_map - it seems good, so I’d say the issue is most likely with the webhook URL (see my previous comment)

Thanks Viktor, we have both web hooks listed for the project. Shall I just delete the old one?

I’d say yes, delete the old one, but make sure that the URL of the “new one” matches the webhook URL you can see on the Code tab (on bitrise.io) of the app.

1 Like