Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1name: Backport 2on: 3 pull_request_target: 4 types: [closed, labeled] 5 6# WARNING: 7# When extending this action, be aware that $GITHUB_TOKEN allows write access to 8# the GitHub repository. This means that it should not evaluate user input in a 9# way that allows code injection. 10 11permissions: 12 contents: read 13 14jobs: 15 backport: 16 permissions: 17 contents: write # for korthout/backport-action to create branch 18 pull-requests: write # for korthout/backport-action to create PR to backport 19 name: Backport Pull Request 20 if: github.repository_owner == 'NixOS' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name)) 21 runs-on: ubuntu-latest 22 steps: 23 - uses: actions/checkout@v3 24 with: 25 ref: ${{ github.event.pull_request.head.sha }} 26 - name: Create backport PRs 27 uses: korthout/backport-action@v1.2.0 28 with: 29 # Config README: https://github.com/korthout/backport-action#backport-action 30 copy_labels_pattern: 'severity:\ssecurity' 31 pull_description: |- 32 Bot-based backport to `${target_branch}`, triggered by a label in #${pull_number}. 33 34 * [ ] Before merging, ensure that this backport complies with the [Criteria for Backporting](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#criteria-for-backporting-changes). 35 * Even as a non-commiter, if you find that it does not comply, leave a comment.