-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pr): comment on the Pull Request only if there is a status report…
…, otherwise skip Signed-off-by: Patrick Heneise <[email protected]>
- Loading branch information
1 parent
70a4bfe
commit 1807458
Showing
3 changed files
with
32 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
name: Integraton Test | ||
|
||
on: [pull_request] | ||
on: [pull_request_target] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- uses: actions/[email protected] | ||
with: | ||
version: 12 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,15 +22,29 @@ Validate markdown files with SEO best practices. Creates a pull request comment | |
|
||
## Usage | ||
|
||
If your repo is public and you have pull requests from forks, `pull_request_target` is required, as this Action creates a comment on a Pull Request and therefore requires read/write permissions. Read more about the `pull_request_target` trigger [here](https://securitylab.github.com/research/github-actions-preventing-pwn-requests). If your repo is private, you can change this to `pull_request` and remove the `ref` in the checkout action. | ||
|
||
```yaml | ||
- name: Markdown SEO Check | ||
uses: zentered/[email protected] | ||
with: | ||
max_title_length: 70 | ||
max_description_length: 150 | ||
max_slug_length: 100 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
name: check | ||
|
||
on: pull_request_target | ||
|
||
jobs: | ||
seocheck: | ||
name: Markdown SEO Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Markdown SEO Check | ||
uses: zentered/[email protected] | ||
with: | ||
max_title_length: 70 | ||
max_description_length: 150 | ||
max_slug_length: 100 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
## Inputs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters