Skip to content
Merged
Show file tree
Hide file tree
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
21 changes: 12 additions & 9 deletions .github/workflows/bot_style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
steps:
- name: Extract PR details
id: pr_info
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const prNumber = context.payload.issue.number;
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
fi

- name: Verify PR head SHA is unchanged before running untrusted code
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
EXPECTED_HEAD_SHA: ${{ steps.pr_info.outputs.headSha }}
with:
Expand All @@ -93,7 +93,7 @@ jobs:
}

- name: Check commit was pushed before the triggering comment
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
HEAD_SHA: ${{ steps.pr_info.outputs.headSha }}
HEAD_REPO_FULL_NAME: ${{ steps.pr_info.outputs.headRepoFullName }}
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
}

- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.10"

Expand All @@ -158,7 +158,7 @@ jobs:
fi

- name: Upload style fixes artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: style-bot-output-${{ github.run_id }}
path: ${{ runner.temp }}/style-bot-output
Expand All @@ -180,9 +180,12 @@ jobs:
private-key: ${{ secrets.HF_BOT_STYLE_SECRET_PEM }}
owner: ${{ github.repository_owner }}
repositories: ${{ github.event.repository.name }}
# Scope the app token down to the minimum permissions needed
# (pushing style-fix commits to the PR branch).
permission-contents: write

- name: Re-validate PR head SHA before trusted steps
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
EXPECTED_HEAD_SHA: ${{ needs.run.outputs.headSha }}
with:
Expand Down Expand Up @@ -218,14 +221,14 @@ jobs:
fi

- name: Download style fixes artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: style-bot-output-${{ github.run_id }}
path: ${{ runner.temp }}/style-bot-output

- name: Comment on PR with workflow run link
id: init_comment
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
prNumber: ${{ needs.run.outputs.prNumber }}
with:
Expand Down Expand Up @@ -291,7 +294,7 @@ jobs:
fi

- name: Comment on PR
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
COMMENT_ID: ${{ steps.init_comment.outputs.comment_id }}
FINAL_COMMENT: ${{ steps.prepare_final_comment.outputs.final_comment }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/diffusers_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
steps:
- name: Authorize and parse command
id: check
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
const commenter = context.payload.comment.user.login;
Expand Down
Loading