Skip to content
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: isolate step that needs additional permissions
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
  • Loading branch information
pnacht committed Dec 8, 2023
commit 997401acc4487638c39383b47328683eac24ebfb
20 changes: 14 additions & 6 deletions .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ permissions:
contents: read

jobs:
pr-comment:
define-comment:
name: Entradas sin traducción
runs-on: ubuntu-22.04
permissions:
issues: write
pull-requests: write
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
comment: ${{ steps.create-pr-comment.outputs.comment }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -43,9 +43,17 @@ jobs:
python scripts/list_missing_entries.py --github $CHANGED_PO_FILES
echo EOF
} >> "$GITHUB_OUTPUT"

write-comment:
runs-on: ubuntu-22.04
needs: [define-comment]
if: needs.define-comment.outputs.any_changed == 'true'
permissions:
issues: write
pull-requests: write
steps:
- name: Agregar comentario con entradas faltantes
if: steps.changed-files.outputs.any_changed == 'true'
uses: thollander/actions-comment-pull-request@v2
with:
message: ${{ steps.create-pr-comment.outputs.comment }}
message: ${{ needs.define-comment.outputs.comment }}
comment_tag: missing-entries