Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially revert #1576 #1700

Merged
merged 1 commit into from
Jan 15, 2024
Merged

Partially revert #1576 #1700

merged 1 commit into from
Jan 15, 2024

Conversation

mgeisler
Copy link
Collaborator

The GitHub action added in #1576 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.

@adetaylor
Copy link
Collaborator

I'm not going to attempt to review this since I know nothing about this new action, and in general am pretty ropey at github actions! Definitely should wait for @djmitche .

@mgeisler
Copy link
Collaborator Author

I'm not going to attempt to review this since I know nothing about this new action, and in general am pretty ropey at github actions!

Thanks, makes sense!

Definitely should wait for @djmitche .

Yeah, that's fair. Dustin is out on vacation today, but luckily Alex has reviewed it.

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.
@mgeisler mgeisler force-pushed the revert-course-schedule-check branch from bdad2f0 to cc3b318 Compare January 15, 2024 12:35
@mgeisler mgeisler merged commit 60c5a33 into main Jan 15, 2024
34 checks passed
@mgeisler mgeisler deleted the revert-course-schedule-check branch January 15, 2024 12:56
djmitche added a commit to djmitche/comprehensive-rust that referenced this pull request Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants