From bdad2f061ab1f329e7bd59f795f49aaeda5a0ced Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Mon, 15 Jan 2024 09:29:14 +0100 Subject: [PATCH] Partially revert #1576 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GitHub action fails because it cannot run with the necessary permissions: it requires write access to be able to post a comment, but when triggered from a fork, the token is limited to read access. The error is from the thollander/actions-comment-pull-request action: No comment has been found with asked pattern. Creating a new comment. Error: Resource not accessible by integration The downgrading of the token is explained on: https://docs.github.com/en/actions/security-guides/automatic-token-authentication where “Maximum access for pull requests from public forked repositories” says that the pull-requests permission is capped at read in the typical case for us. I kept the underlying functionality since we might want to use it for something else (perhaps track the duration in the README). Fixes the errors seen on the recent PRs: #1693, #1687, and likely others. --- .github/workflows/course-schedule.yml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .github/workflows/course-schedule.yml diff --git a/.github/workflows/course-schedule.yml b/.github/workflows/course-schedule.yml deleted file mode 100644 index d1c0c923e0c7..000000000000 --- a/.github/workflows/course-schedule.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: "Course Schedule Updates" -on: - pull_request: - paths: - - "src/**.md" - -jobs: - course-schedule: - runs-on: ubuntu-latest - name: Make Course Schedule Comment - permissions: - pull-requests: write - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Rust cache - uses: ./.github/workflows/setup-rust-cache - - - name: Generate Schedule - run: cargo run -p mdbook-course --bin course-schedule > course-schedule.md - - - name: Comment PR - uses: thollander/actions-comment-pull-request@v2 - with: - filePath: course-schedule.md - comment_tag: course-schedule