<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Backport changes on Grafana Labs</title><link>https://grafana.com/docs/writers-toolkit/review/backport-changes/</link><description>Recent content in Backport changes on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 16 Feb 2024 14:04:14 +0000</lastBuildDate><atom:link href="/docs/writers-toolkit/review/backport-changes/index.xml" rel="self" type="application/rss+xml"/><item><title>Install the backport workflow</title><link>https://grafana.com/docs/writers-toolkit/review/backport-changes/install-the-workflow/</link><pubDate>Tue, 03 Sep 2024 00:00:00 +0000</pubDate><guid>https://grafana.com/docs/writers-toolkit/review/backport-changes/install-the-workflow/</guid><content><![CDATA[&lt;h1 id=&#34;install-the-backport-workflow&#34;&gt;Install the backport workflow&lt;/h1&gt;
&lt;p&gt;Before you can backport changes, the repository must have the workflow installed.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Clone the repository.&lt;/p&gt;
&lt;p&gt;For more information, refer to &lt;a href=&#34;/docs/writers-toolkit/write/tooling-and-workflows/#create-a-local-repository&#34;&gt;Create a repository&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;steps&#34;&gt;Steps&lt;/h2&gt;
&lt;p&gt;To install the backport workflow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Check out a new branch for your changes.&lt;/p&gt;
&lt;p&gt;To check out a branch, refer to &lt;a href=&#34;/docs/writers-toolkit/write/tooling-and-workflows/#create-a-branch-from-the-default-remote-branch&#34;&gt;Create a branch from the default remote branch&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the &lt;code&gt;.github/workflows/backport.yml&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;Use the following YAML as the contents of the file.
You must update &lt;em&gt;&lt;code&gt;REPOSITORY&lt;/code&gt;&lt;/em&gt; to be the name of your repository.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;name: Backport PR creator
on:
  pull_request_target:
    types:
      - closed
      - labeled

jobs:
  main:
    if: github.repository == &amp;#39;grafana/&amp;lt;REPOSITORY&amp;gt;&amp;#39;
    runs-on: ubuntu-latest
    steps:
      - name: Checkout actions
        uses: actions/checkout@v4
        with:
          repository: grafana/grafana-github-actions
          path: ./actions
      - name: Install actions
        run: npm install --production --prefix ./actions
      - name: Run backport
        uses: ./actions/backport
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          labelsToAdd: backport
          title: &amp;#34;[{{base}}] {{originalTitle}}&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Commit the file.&lt;/p&gt;
&lt;p&gt;For more information, refer to &lt;a href=&#34;/docs/writers-toolkit/write/tooling-and-workflows/#commit-changes-to-your-branch&#34;&gt;Commit changes to your branch&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open a pull request for your changes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After a maintainer merges your pull request, you can backport changes using labels by following the instructions in &lt;a href=&#34;/docs/writers-toolkit/review/backport-changes/&#34;&gt;Backport changes&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="install-the-backport-workflow">Install the backport workflow&lt;/h1>
&lt;p>Before you can backport changes, the repository must have the workflow installed.&lt;/p>
&lt;h2 id="before-you-begin">Before you begin&lt;/h2>
&lt;ul>
&lt;li>
&lt;p>Clone the repository.&lt;/p>
&lt;p>For more information, refer to &lt;a href="/docs/writers-toolkit/write/tooling-and-workflows/#create-a-local-repository">Create a repository&lt;/a>.&lt;/p></description></item></channel></rss>