From c648a362163fd8b904f3daa5af090767a7b83fb2 Mon Sep 17 00:00:00 2001 From: Randolph Sapp Date: Mon, 28 Oct 2024 22:21:26 -0500 Subject: [PATCH] doc(example): set permissions and only post on pr Update the example so it only attempts to post comments on the PR action and set the permissions fields to the minimum values required to leave comments on PRs. Signed-off-by: Randolph Sapp --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c9a2679..1646fb9 100644 --- a/README.md +++ b/README.md @@ -23,20 +23,25 @@ on: jobs: commit-check: runs-on: ubuntu-latest + permissions: + contents: read + issues: write + pull-requests: write steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} # Checkout PR HEAD commit - uses: commit-check/commit-check-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: message: true branch: true author-name: true author-email: true commit-signoff: true - dry-run: true job-summary: true - pr-comments: true + pr-comments: ${{ github.event_name == 'pull_request' }} ``` ## Optional Inputs pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy