Skip to content

Set minimal workflow token permissions #2773

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

Merged
merged 4 commits into from
Dec 12, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
pr-comment: Safe checkout of script files
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
  • Loading branch information
pnacht committed Dec 8, 2023
commit 71fddb69c9d46746a111d538b706dd6fd6b6985a
13 changes: 11 additions & 2 deletions .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,18 @@ jobs:
with:
python-version: "3.11"
cache: "pip"
# checkout these files from the base branch to guarantee they haven't been
# modified by the PR
- uses: actions/checkout@v4
with:
path: base-branch
sparse-checkout-cone-mode: false
sparse-checkout: |
requirements.txt
scripts/list_missing_entries.py
- name: Instalar dependencias
run: |
python -m pip install -r requirements.txt
python -m pip install -r base-branch/requirements.txt
- name: Obtiene lista de archivos con cambios
id: changed-files
uses: tj-actions/changed-files@v40
Expand All @@ -40,7 +49,7 @@ jobs:
run: |
{
echo 'comment<<EOF'
python scripts/list_missing_entries.py --github $CHANGED_PO_FILES
python base-branch/scripts/list_missing_entries.py --github $CHANGED_PO_FILES
echo EOF
} >> "$GITHUB_OUTPUT"

Expand Down