Skip to content
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

Enable Change Comments On Fork-based PRs #1303

Merged
merged 1 commit into from
Jun 28, 2024
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
28 changes: 28 additions & 0 deletions .github/workflows/covector-comment-on-fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: covector comment
on:
workflow_run:
workflows: [covector status] # the `name` of the workflow run on `pull_request` running `status` with `comment: true`
types:
- completed

# note all other permissions are set to none if not specified
# and these set the permissions for `secrets.GITHUB_TOKEN`
permissions:
# to read the action artifacts on `covector status` workflows
actions: read
# to write the comment
pull-requests: write

jobs:
download:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success' &&
(github.event.workflow_run.head_repository.full_name != github.repository || github.actor == 'dependabot[bot]')
steps:
- name: covector status
# note we are using the release branch temporarily awaiting a publish of these versions: https://github.com/jbolda/covector/pull/317
# those changes include updates to support commenting from forks
uses: jbolda/covector/packages/action@release
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: "status"
11 changes: 7 additions & 4 deletions .github/workflows/covector-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: covector status
uses: jbolda/covector/packages/action@covector-v0
id: covector
# note we are using the release branch temporarily awaiting a publish of these versions: https://github.com/jbolda/covector/pull/317
# those changes include updates to support commenting from forks
uses: jbolda/covector/packages/action@release
with:
command: 'status'
command: "status"
token: ${{ secrets.GITHUB_TOKEN }}
comment: true
comment: true