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:
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?