Skip to content

Commit

Permalink
Docs typo (#225)
Browse files Browse the repository at this point in the history
- fix a docs typo about `pull-requests` permissions
- add write permissions to token in self-test CI
- improve self-test CI step that shows `*checks-failed` outputs
  • Loading branch information
2bndy5 authored Mar 27, 2024
1 parent d622b2b commit f487388
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/self-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:

jobs:
test:
permissions:
issues: write

This comment has been minimized.

Copy link
@2bndy5

2bndy5 Mar 27, 2024

Author Collaborator

self-test CI failed to post comment on push event. This issues: write might be insufficient for push events to post comments...

This comment has been minimized.

Copy link
@2bndy5

2bndy5 Mar 27, 2024

Author Collaborator

According to GH docs, I think this needs to be

    permissions:
      contents:read
pull-requests: write
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
Expand Down Expand Up @@ -61,7 +64,8 @@ jobs:
# if: steps.linter.outputs.checks-failed > 0
run: |
echo "some linter checks failed"
echo "${{ steps.linter.outputs.checks-failed }}"
echo "${{ env.checks-failed }}"
echo "total checks-failed: ${{ steps.linter.outputs.checks-failed }}"
echo "clang-tidy checks-failed: ${{ steps.linter.outputs.clang-tidy-checks-failed }}"
echo "clang-format checks-failed: ${{ steps.linter.outputs.clang-format-checks-failed }}"
# for actual deployment
# run: exit 1
4 changes: 2 additions & 2 deletions docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ inputs:
tidy-review:
experimental: true
minimum-version: '2.9.0'
required-permission: 'pull_request: write #pull-request-reviews'
required-permission: 'pull-requests: write #pull-request-reviews'
format-review:
minimum-version: '2.9.0'
required-permission: 'pull_request: write #pull-request-reviews'
required-permission: 'pull-requests: write #pull-request-reviews'
outputs:
checks-failed:
minimum-version: '1.2.0'
Expand Down
4 changes: 2 additions & 2 deletions docs/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The [`thread-comments`](inputs-outputs.md#thread-comments) feature requires the
```yaml
permissions:
issues: write # (1)!
pull_requests: write # (2)!
pull-requests: write # (2)!
```

1. for [push events](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push)
Expand All @@ -41,5 +41,5 @@ The [`tidy-review`](inputs-outputs.md#tidy-review) and [`format-review`](inputs-

```yaml
permissions:
pull_requests: write
pull-requests: write
```

0 comments on commit f487388

Please sign in to comment.