Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test PR (IGNORE) #6864

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 34 additions & 27 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Backport
on:
pull_request_target:
types:
- closed
- labeled
on: [pull_request]
# pull_request_target:
# types:
# - closed
# - labeled

jobs:
backport:
Expand All @@ -14,27 +14,34 @@ jobs:
name: Backport
# Only react to merged PRs for security reasons.
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
github.event.pull_request.merged
&& (
github.event.action == 'closed'
|| (
github.event.action == 'labeled'
&& contains(github.event.label.name, 'backport')
)
)
# if: >
# github.event.pull_request.merged
# && (
# github.event.action == 'closed'
# || (
# github.event.action == 'labeled'
# && contains(github.event.label.name, 'backport')
# )
# )
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
# opensearch-trigger-bot installation ID
installation_id: 22958780
# - name: GitHub App token
# id: github_app_token
# uses: tibdex/[email protected]
# with:
# app_id: ${{ secrets.APP_ID }}
# private_key: ${{ secrets.APP_PRIVATE_KEY }}
# # opensearch-trigger-bot installation ID
# #installation_id: 22958780

- name: Backport
uses: VachaShah/[email protected]
with:
github_token: ${{ steps.github_app_token.outputs.token }}
head_template: backport/backport-<%= number %>-to-<%= base %>
# - name: Backport
# uses: VachaShah/[email protected]
# with:
# github_token: ${{ steps.github_app_token.outputs.token }}
# head_template: backport/backport-<%= number %>-to-<%= base %>

- name: Check gh
run: |
PR_BRANCH=test123123
gh pr list -R peterzhuamazon/documentation-website --json "number,headRefName" --state open | jq -r ".[] | select(.headRefName == \"$PR_BRANCH\") | .number"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading