name: Backport Merged Pull Request on: pull_request_target: types: [closed] permissions: contents: write issues: write pull-requests: write # NOTE: # Microsoft requires rotating BOT_PAT every 3 months. # Log onto agent-lightning-bot account and rotate the PAT if needed. jobs: backport: name: Backport pull request runs-on: ubuntu-latest # Don't run on closed unmerged pull requests if: github.event.pull_request.merged steps: - uses: actions/checkout@v6 - name: Create backport pull requests uses: korthout/backport-action@v3 with: branch_name: 'backport/${pull_number}/${target_branch}' label_pattern: ^(stable/[^ ]+)$ github_token: ${{ secrets.BOT_PAT }} add_labels: backport add_author_as_assignee: true git_committer_name: agent-lightning-bot # This email address is not monitored. git_committer_email: agl.msft@outlook.com