# How to override \`scm\_branch\` for a Job Template triggered by a GitHub webhook?

**URL:** <https://forum.ansible.com/t/how-to-override-scm-branch-for-a-job-template-triggered-by-a-github-webhook/44934>\
**Category:** Get Help\
**Tags:** github, awx\
**Created:** [December 2, 2025, 8:12pm UTC](https://forum.ansible.com/t/how-to-override-scm-branch-for-a-job-template-triggered-by-a-github-webhook/44934 "2025-12-02T20:12:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrajpuro](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rrajpuro/32/7980_2.png) [@rrajpuro](https://forum.ansible.com/u/rrajpuro)\
**Post date:** [December 2, 2025, 8:12pm UTC](https://forum.ansible.com/t/how-to-override-scm-branch-for-a-job-template-triggered-by-a-github-webhook/44934/1 "2025-12-02T20:12:17Z")

</div>

I’m trying to override the `scm_branch` used by a Job Template that is launched via a GitHub webhook.

I’ve already enabled **Allow Branch Override** and **Update Revision on Launch** on both the Project and the Job Template. The webhook payload includes the branch name, so I tried setting this on the `extra_vars` of the job template:

```yaml
scm_branch: "{{ awx_webhook_payload.pull_request.head.ref }}"

```

However, this doesn’t work. I also understand that `scm_branch` is normally set internally by the API, but I wanted to see if it could be overridden dynamically.

Has anyone successfully overridden the branch for a webhook-launched job? Is there a recommended pattern or workaround for this scenario?
