-
Notifications
You must be signed in to change notification settings - Fork 3
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
docs: enable pull requests to publish a preview #11
base: main
Are you sure you want to change the base?
Conversation
Thank you for raising a pull request to update the configuration of your GitHub organization. The following conditions need to fulfilled for auto-merging to be available:
Otterdog commands and optionsYou can trigger otterdog actions by commenting on this PR:
|
The author (AlexanderLanin) of this PR is associated with this organization in the role of |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/otterdog validate info |
Please find below the validation of the requested configuration changes: Diff for 70ece1cProject automotive.score[github_id=eclipse-score]
+
+ Info: repository[name=".github"] has 'actions_can_approve_pull_request_reviews' enabled, while on
+ organization level it is disabled, setting will be ignored.
+
+
+ Info: repository[name="bazel_registry"] has 'actions_can_approve_pull_request_reviews' enabled, while on
+ organization level it is disabled, setting will be ignored.
+
+
+ Info: repository[name="eclipse-score.github.io"] has 'actions_can_approve_pull_request_reviews' enabled,
+ while on organization level it is disabled, setting will be ignored.
+
+
+ Info: repository[name="inc_feo"] has 'actions_can_approve_pull_request_reviews' enabled, while on
+ organization level it is disabled, setting will be ignored.
+
+
+ Info: repository[name="inc_mw_com"] has 'actions_can_approve_pull_request_reviews' enabled, while on
+ organization level it is disabled, setting will be ignored.
+
+
+ Info: repository[name="inc_mw_log"] has 'actions_can_approve_pull_request_reviews' enabled, while on
+ organization level it is disabled, setting will be ignored.
+
+
+ Info: repository[name="inc_mw_per"] has 'actions_can_approve_pull_request_reviews' enabled, while on
+ organization level it is disabled, setting will be ignored.
+
+
+ Info: repository[name="process_description"] has 'actions_can_approve_pull_request_reviews' enabled,
+ while on organization level it is disabled, setting will be ignored.
+
+
+ Info: repository[name="reference_integration"] has 'actions_can_approve_pull_request_reviews' enabled,
+ while on organization level it is disabled, setting will be ignored.
+
+
+ Info: repository[name="score"] has 'default_workflow_permissions' of value 'write', while on
+ organization level it is restricted to 'read', setting will be ignored.
+
+
+ Info: repository[name="score"] has 'actions_can_approve_pull_request_reviews' enabled, while on
+ organization level it is disabled, setting will be ignored.
+
Plan: 0 to add, 0 to change, 0 to delete. |
so overwriting specific settings on repo level while on org level it is more restricted does not work and the setting will be ignored. In your case, you should adapt the workflow to specify the required permission it needs, see https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token |
@netomi sorry I was unclear. That's what we tried already. It doesn't help. And it seems this does not work because it cannot have more access than the "default". At least that's how I understand it at the moment. |
it does not work for PRs from forks. In such cases the workflow will not get write tokens. This is the default behavior of GitHub. So there are workarounds that we applied for several projects, see for example https://github.com/eclipse-langium/langium-website/blob/main/.github/workflows/preview.yml |
We have an action running, which will publish pull request previews into /pr-123 subdirectories in gh-pages. However that action currently cannot push to gh-pages branch.
GITHUB_TOKEN is currently allowed to push to branches when running for branch builds, but it's disabled when running from PR builds. This PR adjusts the relevant setting.
note: there is contradicting information on the internet regarding how 'default workflow permissions' behave. But it seems (as evidenced in this case), that the interpretation of it serving as a maximum is correct. Workflows cannot elevate themselves to write, when the default is set to read-only.
Examples of default_workflow_permissions in combination with gh-pages: