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

Adjust permissions of format action #773

Closed
wants to merge 2 commits into from

Conversation

gdalle
Copy link
Contributor

@gdalle gdalle commented Nov 24, 2024

This is a test to see if I can overcome the formatting permissions issue of #772

Related:

@gdalle
Copy link
Contributor Author

gdalle commented Nov 24, 2024

This fails because PRs from forks cannot give a write permission to the GITHUB_TOKEN

Finally, if the workflow was triggered by a pull request from a forked repository, and the Send write tokens to workflows from pull requests setting is not selected, the permissions are adjusted to change any write permissions to read only.

https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#how-the-permissions-are-calculated-for-a-workflow-job

Copy link

codecov bot commented Nov 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.41%. Comparing base (5bc3cd5) to head (abbf29e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #773   +/-   ##
=======================================
  Coverage   96.41%   96.41%           
=======================================
  Files         124      124           
  Lines       11590    11590           
=======================================
  Hits        11175    11175           
  Misses        415      415           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@kellertuer
Copy link
Member

But format also does not commit here, it would just report the errors as code watch comments. Sure, these comments you might not get, but running using JluiaFormatter; format("."); is all we require here. So that can also just be considered as a reminder to do that similar to the Changeling CI, that we added after we (maybe mainly I) missed to write an entry there a few times in a row.

@gdalle
Copy link
Contributor Author

gdalle commented Nov 24, 2024

Fair enough, I see that it succeeds now because for a well-formatted code it doesn't try to write the comments. Closing.

@gdalle gdalle closed this Nov 24, 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.

2 participants