Skip to content

Commit

Permalink
Merge pull request #14 from saritasa-nest/feature/update-secrets-check
Browse files Browse the repository at this point in the history
feat: update secrets checks
  • Loading branch information
darliiin authored Feb 3, 2025
2 parents 1a66d47 + 681b9ee commit ade22e5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/actions/secrets-checks/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ inputs:
https://github.com/gitleaks/gitleaks-action
required: true
default: "false"
enable-pr-comment:
description: |
enable pr comment
false only for .net projects
required: true
default: "true"
github-token:
description: github token secret
required: true
Expand Down Expand Up @@ -107,7 +113,7 @@ runs:
- name: create pr comment with checks results
shell: bash
if: always() && github.event_name == 'pull_request'
if: always() && github.event_name == 'pull_request' && inputs.enable-pr-comment == 'true'
run: |
python3 ${{ github.action_path }}/scripts/generate-message.py \
${{ github.action_path }}/templates/pr-comment-template.j2 \
Expand All @@ -116,15 +122,15 @@ runs:
- name: find pr comment with check results
uses: peter-evans/find-comment@v3
if: always() && github.event_name == 'pull_request'
if: always() && github.event_name == 'pull_request' && inputs.enable-pr-comment == 'true'
id: find-comment
with:
issue-number: ${{ github.event.number }}
comment-author: "github-actions[bot]"
body-includes: Summary of the secrets check

- name: upload checks results as a pr comment
if: always() && github.event_name == 'pull_request'
if: always() && github.event_name == 'pull_request' && inputs.enable-pr-comment == 'true'
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.number }}
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2025-01-30

[v3.2]

- [associated PR](https://github.com/saritasa-nest/saritasa-github-actions/pull/14)
- Added variable `enable-pr-comment` for `secrets-checks`, allowing to disable PR check comment.
Used for .NET projects where the comment is unnecessary for developers.

## 2024-11-25

[v3.1]
Expand Down

0 comments on commit ade22e5

Please sign in to comment.