Skip to content

Commit

Permalink
Update auto-rebase.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
GitGab19 authored Aug 30, 2024
1 parent a43d166 commit ce38df2
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/auto-rebase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@ jobs:
rebase-outdated-prs:
runs-on: ubuntu-latest
steps:
- uses: tibdex/github-app-token@v1
id: generate-token
#- uses: tibdex/github-app-token@v1
#id: generate-token
#with:
#app_id: ${{ secrets.APP_ID}}
#private_key: ${{ secrets.APP_PRIVATE_KEY }}
#permissions: >-
#{"pull_requests": "write", "workflows": "write", "contents": "read"}
- name: Get Token
id: get_workflow_token
uses: peter-murray/workflow-application-token-action@v3
with:
app_id: ${{ secrets.APP_ID}}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
permissions: >-
{"pull_requests": "write", "workflows": "write", "contents": "read"}
application_id: ${{ secrets.APP_ID }}
application_private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Debug Permissions
run: |
echo "Token: ${{ steps.generate-token.outputs.token }}"
Expand All @@ -27,15 +33,15 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITGAB_SRI_PERSONAL_TOKEN }}
token: ${{ steps.get_workflow_token.outputs.token }}
fetch-depth: 0 # Fetch full history to have the entire commit history

- name: Fetch open pull requests with label
run: |
gh auth setup-git
gh pr list --state open --label "ready-to-be-merged" --json number,headRepositoryOwner,headRefName --jq '.[] | "\(.number) \(.headRepositoryOwner.login) \(.headRefName)"' > pr_details.txt
env:
GITHUB_TOKEN: ${{ secrets.GITGAB_SRI_PERSONAL_TOKEN }}
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }}

- name: Rebase pull requests
run: |
Expand Down Expand Up @@ -87,4 +93,4 @@ jobs:
done < pr_details.txt
env:
GITHUB_TOKEN: ${{ secrets.GITGAB_SRI_PERSONAL_TOKEN }}
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }}

0 comments on commit ce38df2

Please sign in to comment.