From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Chris. Webster" <chris@webstech.net>,
Johannes Schindelin <johannes.schindelin@gmx.de>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH 1/2] ci(check-whitespace): stop requiring a read/write token
Date: Wed, 14 Jul 2021 22:09:36 +0000 [thread overview]
Message-ID: <b54c137cb14527c14bd7c990f9cf32dca50ba5dc.1626300577.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.995.git.1626300577.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
As part of some recent security tightening, GitHub introduced the
ability to configure GitHub workflows to be run with a read-only token.
This is much more secure, in particular when working in a public
repository: While the regular read/write token might be restricted to
writing to the current branch, it is not necessarily restricted to
access only the current Pull Request.
However, the `check-whitespace` workflow threw a wrench into this plan:
it _requires_ write access (because it wants to add a PR comment in case
of a whitespace issue).
Let's just skip that PR comment. The user can always click through to
the actual error, even if it is slightly less convenient.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
.github/workflows/check-whitespace.yml | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/.github/workflows/check-whitespace.yml b/.github/workflows/check-whitespace.yml
index f1483059c76..c53614d6033 100644
--- a/.github/workflows/check-whitespace.yml
+++ b/.github/workflows/check-whitespace.yml
@@ -51,21 +51,5 @@ jobs:
if test -n "${log}"
then
- echo "::set-output name=checkout::"${log}""
exit 2
fi
-
- - name: Add Check Output as Comment
- uses: actions/github-script@v3
- id: add-comment
- env:
- log: ${{ steps.check_out.outputs.checkout }}
- with:
- script: |
- await github.issues.createComment({
- issue_number: context.issue.number,
- owner: context.repo.owner,
- repo: context.repo.repo,
- body: `Whitespace errors found in workflow ${{ github.workflow }}:\n\n\`\`\`\n${process.env.log.replace(/\\n/g, "\n")}\n\`\`\``
- })
- if: ${{ failure() }}
--
gitgitgadget
next prev parent reply other threads:[~2021-07-14 22:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 22:09 [PATCH 0/2] check-whitespace: two fixes Johannes Schindelin via GitGitGadget
2021-07-14 22:09 ` Johannes Schindelin via GitGitGadget [this message]
2021-07-14 22:20 ` [PATCH 1/2] ci(check-whitespace): stop requiring a read/write token Junio C Hamano
2021-07-14 22:09 ` [PATCH 2/2] ci(check-whitespace): restrict to the intended commits Johannes Schindelin via GitGitGadget
2021-07-14 22:25 ` Junio C Hamano
2021-07-14 22:29 ` Taylor Blau
2021-07-15 13:00 ` Johannes Schindelin
2021-07-15 12:59 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b54c137cb14527c14bd7c990f9cf32dca50ba5dc.1626300577.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=chris@webstech.net \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).