Skip to content

Commit

Permalink
modified: .github/workflows/master-pr.yml
Browse files Browse the repository at this point in the history
Problem: Prs opened by forks do not have access to secrets. The WF to change from default banch > develop uses a secret inaccessible by forks.
- Modifying the workflow permissions to enable explicit write allowance to the API endpoint used for modifying the pull request base branch.
- Removed references to internal secrets.
  • Loading branch information
F-WRunTime committed Nov 25, 2024
1 parent 6b83029 commit ea5c125
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ jobs:
change-base:
name: 'Change base to develop branch'
runs-on: ubuntu-24.04
permissions:
pull-requests: write
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
# fetch-depth 0 means deep clone the repo
fetch-depth: 0
- name: 'Change base'
env:
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }}
GITHUB_TOKEN: ${{ github.token }}
run: |
set -x
pull_number=$(jq --raw-output .pull_request.number "${GITHUB_EVENT_PATH}")
Expand Down

0 comments on commit ea5c125

Please sign in to comment.