Skip to content

Commit

Permalink
Update grammar-check.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Kseymur committed Oct 15, 2023
1 parent 152551a commit ec3b138
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions .github/workflows/grammar-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,13 @@ on:
issue_comment:
types: [created]

permissions:
contents: read
issues: read
pull-requests: write

jobs:
permission-check-job:
grammar-check:
runs-on: ubuntu-latest
name: "Check Grammar mistakes in a Github PR and comment on the PR"
if: |
github.event.issue.pull_request &&
contains(github.event.comment.body, '/qualitycheck')
outputs:
permission: ${{ steps.permissions-check.outputs.defined }}
steps:
- name: Check for Secret availability
id: permissions-check
shell: bash
run: |
echo "defined=${{ contains(fromJSON(secrets.WIKI_REVIEWERS), github.actor) }}" >> $GITHUB_OUTPUT;
grammar-check:
runs-on: ubuntu-latest
name: "Check Grammar mistakes in a Github PR and comment on the PR"
needs: [permission-check-job]
if: needs.permission-check-job.outputs.permission == 'true'
steps:
- uses: actions/checkout@v3

Expand All @@ -43,4 +25,4 @@ jobs:
run: |
poetry run grammar-check \
--pull-url "${{ github.event.issue.pull_request.url }}" \
--github-token "${{ secrets.GITHUB_TOKEN }}"
--github-token "${{ secrets.TOKEN }}"

0 comments on commit ec3b138

Please sign in to comment.