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

Disable PR comment by default from forks #64

Merged
merged 3 commits into from
Aug 20, 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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ Add these parameters under the `with` section of the `uses` step in the workflow
| `paths` | Limit to specific files or directories (separated by newlines). | |
| `exclude_imports` | Exclude files imported by the target modules. | False |
| `exclude_paths` | Exclude specific files or directories, e.g. "proto/a/a.proto", "proto/a" (separated by newlines). | |
| `pr_comment` | Comment the results on the pull request. The workflow and job name combination must be unique. | Only on pull requests |
| `pr_comment` | Comment the results on the pull request. The workflow and job name combination must be unique. | Only on pull requests (non forks) |
| `format` | Whether to run the formatting step. | Runs on pushes to Git PR |
| `lint` | Whether to run the linting step. | Runs on pushes to Git PR |
| `breaking` | Whether to run the breaking change detection step. | Runs on pushes to Git PR |
| `breaking_against` | [Input](https://buf.build/docs/reference/inputs) to compare against. | Base of the PR or the commit before the event |
| `push` | Whether to run the push step. | Runs on Git pushes |
| `push` | Whether to run the push step. | Runs on Git pushes (non forks) |
| `push_disable_create` | Disables repository creation if it does not exist. | False |
| `archive` | Whether to run the archive step. | Runs on Git deletes |
| `archive` | Whether to run the archive step. | Runs on Git deletes (non forks) |
| `setup_only` | Setup only the `buf` environment, optionally logging into the BSR, but without executing other commands. | |
| `github_actor` | GitHub actor for API requests. | Actor from GitHub context |
| `github_token` | GitHub token for API requests. Ensures requests aren't rate limited | Token from GitHub context |
Expand Down
7 changes: 4 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ inputs:
pr_comment:
description: |-
Comment on the pull request with the results of each step. The workflow and job name combination must be unique.
Only runs on pull requests, for non forked repositories.
required: false
default: ${{ github.event_name == 'pull_request' }}
default: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}

input:
description: |-
Expand Down Expand Up @@ -115,7 +116,7 @@ inputs:

push:
description: |-
Whether to run the push step. Runs by default on pushes.
Whether to run the push step. Runs by default on pushes, for non forked repositories.
required: false
default: ${{ github.event_name == 'push' }}
push_disable_create:
Expand All @@ -126,7 +127,7 @@ inputs:

archive:
description: |-
Whether to run the archive step. Runs by default on deletes.
Whether to run the archive step. Runs by default on deletes, for non forked repositories.
required: false
default: ${{ github.event_name == 'delete' }}

Expand Down
Loading