Skip to content

Commit f0ac7aa

Browse files
authored
Security fix (#10905)
fix Co-authored-by: ydshieh <[email protected]>
1 parent 613e77f commit f0ac7aa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/pr_style_bot.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ jobs:
5353
HEADREF: ${{ steps.pr_info.outputs.headRef }}
5454
PRNUMBER: ${{ steps.pr_info.outputs.prNumber }}
5555
run: |
56-
echo "PR number: ${{ env.PRNUMBER }}"
57-
echo "Head Ref: ${{ env.HEADREF }}"
58-
echo "Head Repo Full Name: ${{ env.HEADREPOFULLNAME }}"
56+
echo "PR number: $PRNUMBER"
57+
echo "Head Ref: $HEADREF"
58+
echo "Head Repo Full Name: $HEADREPOFULLNAME"
5959
6060
- name: Set up Python
6161
uses: actions/setup-python@v4
@@ -89,20 +89,20 @@ jobs:
8989
PRNUMBER: ${{ steps.pr_info.outputs.prNumber }}
9090
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9191
run: |
92-
echo "HEADREPOFULLNAME: ${{ env.HEADREPOFULLNAME }}, HEADREF: ${{ env.HEADREF }}"
92+
echo "HEADREPOFULLNAME: $HEADREPOFULLNAME, HEADREF: $HEADREF"
9393
# Configure git with the Actions bot user
9494
git config user.name "github-actions[bot]"
9595
git config user.email "github-actions[bot]@users.noreply.github.com"
9696
9797
# Make sure your 'origin' remote is set to the contributor's fork
98-
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ env.HEADREPOFULLNAME }}.git"
98+
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/$HEADREPOFULLNAME.git"
9999
100100
# If there are changes after running style/quality, commit them
101101
if [ -n "$(git status --porcelain)" ]; then
102102
git add .
103103
git commit -m "Apply style fixes"
104104
# Push to the original contributor's forked branch
105-
git push origin HEAD:${{ env.HEADREF }}
105+
git push origin HEAD:$HEADREF
106106
echo "changes_pushed=true" >> $GITHUB_OUTPUT
107107
else
108108
echo "No changes to commit."

0 commit comments

Comments
 (0)