Let Chatops run the pipeline against a branch other than default branch
Problem to solve
By default, jobs using ChatOps are ran against the default branch of a project. However, for testing a new ChatOps command, we may need to run it against a feature branch.
Intended users
Well, anyone who use ChatOps.
Proposal
Slack slash commands settings use a URL like https://gitlab.com/api/v4/projects/123456/services/slack_slash_commands/trigger
as the postback URL from Slack. Accept an argument to this URL like ?branch=<branch name>
and trigger the pipeline against that branch.
Links / references
Also asked in https://forum.gitlab.com/t/how-to-run-a-chatops-job-on-a-specific-branch/20159