I have a repo A(upstream) and a repo B(downstream). After some jobs complete in repo A; I want to trigger some jobs in repo B. I was able to achieve that. 
trigger_repo_B:
  stage: trigger_repo_B
  trigger:
    project: test/repo_B
What I havent been able to figure out is - how do I go about triggering repo B jobs for a non-existent branch in repo B. For example I can trigger jobs in repo B for a specific branch C if C exists but if C does not exist the pipeline is in a pending state. I want to be able to create a branch in B and then run the jobs in B if the branch C does not exist. 
trigger_repo_B:
  stage: trigger_repo_B
  trigger:
    project: test/repo_B
    branch: C
Any ideas? The only way I could think of it working is to do a before_script where I clone the repo and create a branch before triggering the pipeline in B
 
    