title: Is there any way to change branch name automatically inside the .gitlab-ci.yml file?
body: <p>I am trying to build up my <code>.gitlab-ci.yml</code> file in order to accomplish proper pipeline run for my <strong>feature branches</strong>.</p>
  <p>As my feature branches are going to be cloned from development, it will get specific <code>.gitlab-ci.yml</code> which I gave an example below:</p>
  <pre class="lang-yaml prettyprint-override"><code># TCR Compiling Job    
  TCR:
    rules:
      - if: '$CI_PIPELINE_SOURCE == &quot;push&quot; &amp;&amp; $CI_COMMIT_BRANCH == &quot;master&quot;'
        when: on_success
        changes:
          - tcr/**/*
      - if: '$CI_PIPELINE_SOURCE == &quot;web&quot; &amp;&amp; $CI_COMMIT_BRANCH == &quot;development&quot;'
        when: manual
        changes:
          - tcr/**/*     
    
    script:
        - latexmk doc-operation-handbook-tcr.tex
    
    artifacts:
      name: &quot;$CI_JOB_STAGE-$CI_COMMIT_REF_NAME&quot;
      paths:
        - doc-operation-handbook.pdf
      when: on_success
      expire_in: 30 min
  
  </code></pre>
  <p>Inside the above example it can be seen there I have two different rules; one for <strong>master</strong> and one for <strong>development</strong>. But whenever a feature branch created, it is going to try to run this pipeline which there is no defined rules for that feature branch..</p>
  <p>Is there any way to define that automatically whenever a feature branch is created? Like using <code>$CI_COMMIT_BRANCH == &quot;feature_branch&quot;</code> something like that.</p>
  <p><em>Note: My feature branches are going to be deleted after a merge request done correctly.</em></p>