Skip to content

File sync from hanakai-rb/repo-sync #1

File sync from hanakai-rb/repo-sync

File sync from hanakai-rb/repo-sync #1

Workflow file for this run

# frozen_string_literal: true

Check failure on line 1 in .github/workflows/pr-comments.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pr-comments.yml

Invalid workflow file

(Line: 26, Col: 9): Unexpected symbol: '"pull_request"'. Located at position 36 within expression: github.event.workflow_run.event == "pull_request"
# This file is synced from hanakai-rb/repo-sync
# Downloads comment artifacts from completed workflows and posts them to PRs. This allows source
# workflows to run with read-only permissions on fork PRs while still posting comments via this
# privileged workflow that runs in the base repo context.
#
# Comment artifacts should be generated using the `hanakai-rb/repo-sync/pr-comment-artifact@main`
# action.
name: PR comments
on:
workflow_run:
workflows: ["CI"]
types:
- completed
permissions:
pull-requests: write
jobs:
post-comments:
runs-on: ubuntu-latest
if: github.event.workflow_run.event == "pull_request"
steps:
- name: Post comments
uses: hanakai-rb/repo-sync/pr-comments-from-artifacts@main
with:
workflow-run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}