Skip to content

Commit

Permalink
github spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
levgorbunov1 committed Sep 4, 2024
1 parent 197bf0e commit c9a9caa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions slack-github-secret-scanning-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A GitHub Action to forward alerts from GitHub secret scanning and send them to S
## Usage

```
- uses: ministryofjustice/GitHub-actions/slack-GitHub-secret-scanning-integration@v18.1.3
- uses: ministryofjustice/github-actions/slack-github-secret-scanning-integration@v18.1.3
with:
GitHub-token: ${{ secrets.SECRET_SCANNING_GitHub_TOKEN }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
Expand All @@ -14,5 +14,5 @@ A GitHub Action to forward alerts from GitHub secret scanning and send them to S
| Parameter | Description | Required | Default |
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| frequency | Get secret scanning alerts that have occurred in this period prior to this action running | false | 24 hours |
| github-token | [GitHub token with access to secret scanning](https://docs.GitHub.com/en/rest/secret-scanning/secret-scanning?apiVersion=2022-11-28#list-secret-scanning-alerts-for-a-repository) | true | NA |
| github-token | [GitHub token with access to secret scanning](https://docs.github.com/en/rest/secret-scanning/secret-scanning?apiVersion=2022-11-28#list-secret-scanning-alerts-for-a-repository) | true | NA |
| slack-webhook-url | Incoming Slack webhook url for channel that you want to send alerts to | true | NA |
6 changes: 3 additions & 3 deletions slack-github-secret-scanning-integration/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ runs:
- name: Check number of new alerts
shell: bash
id: get-new-alerts
run: echo "new_alerts=$(jq 'length' new_alerts.json)" >> "$GitHub_OUTPUT"
run: echo "new_alerts=$(jq 'length' new_alerts.json)" >> "$GITHUB_OUTPUT"

- name: Convert json to plaintext
shell: bash
if: ${{ steps.get-new-alerts.outputs.new_alerts > 0}}
id: json-to-plaintext
run: |
echo "new-alerts=$(jq -r '.[] | "- \(.secret_type_display_name): \(.html_url)"' new_alerts.json)" >> "$GitHub_OUTPUT"
echo "new-alerts=$(jq -r '.[] | "- \(.secret_type_display_name): \(.html_url)"' new_alerts.json)" >> "$GITHUB_OUTPUT"
- name: Send notification to Slack
id: slack
if: ${{ steps.json-to-plaintext.outcome == 'success' }}
uses: slackapi/slack-GitHub-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 #v1.24.0
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 #v1.24.0
with:
payload: |
{
Expand Down

0 comments on commit c9a9caa

Please # to comment.