mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix the PR comments github actions. No longer comments on ALL PRs
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
08ac1a8613
commit
fadb1d3b5c
1 changed files with 8 additions and 1 deletions
9
.github/workflows/pr-checks.yml
vendored
9
.github/workflows/pr-checks.yml
vendored
|
@ -23,6 +23,10 @@ jobs:
|
|||
python -m pip install --upgrade pip
|
||||
pip install pre-commit pygithub
|
||||
|
||||
- name: Install Pre-Commit Hooks
|
||||
run: |
|
||||
pre-commit install --install-hooks
|
||||
|
||||
- id: changed-files
|
||||
name: Get Changed Files
|
||||
uses: dorny/paths-filter@v2
|
||||
|
@ -38,11 +42,14 @@ jobs:
|
|||
id: check-known-missing-docstrings
|
||||
if: github.event_name == 'pull_request_target' && steps.changed-files.outputs.salt == 'true'
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
set -o pipefail
|
||||
pre-commit run -v --hook-stage manual check-known-missing-docstrings --show-diff-on-failure --color=never --files ${{ join(fromJSON(steps.changed-files.outputs.salt_files), ' ') }} | tee output.txt
|
||||
|
||||
- name: Comment on PR
|
||||
if: hashFiles('output.txt') != ''
|
||||
# Comment on PRs if pre-commit triggered a failure
|
||||
if: steps.check-known-missing-docstrings.outcome == 'failure'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
|
|
Loading…
Add table
Reference in a new issue