Closed nemanja899 closed 1 month ago
what version of AL-Go are you using? v5.1 or preview?
On this repository v4.1
This when automatic updates started failing
It probably started failing when you setup the repository to require Pull Requests (direct commits are not allowed). Currently Update AL-Go System Files running on a schedule will always do direct commits - but I will investigate what it takes to have it create a PR instead.
But we always had that setup for main branch. It was working before. Thought that was the use of ghworkflowtoken to aprove PRs automatically.
Thanks @freddydk.
But we always had that setup for main branch. It was working before. Thought that was the use of ghworkflowtoken to aprove PRs automatically.
Thanks @freddydk.
Did some testing and if you remove this setting in branch protection:
then Update AL-Go Settings Files will actually bypass your branch protection. Did you maybe change this setting at some point in time last month?
But we always had that setup for main branch. It was working before. Thought that was the use of ghworkflowtoken to aprove PRs automatically. Thanks @freddydk.
Did some testing and if you remove this setting in branch protection:
then Update AL-Go Settings Files will actually bypass your branch protection. Did you maybe change this setting at some point in time last month?
We didn't it was always like this, and I apologize checked workflows it was passing because it has nothing to update with.
Thanks - we will be changing the functionality to automatically create a PR if it cannot update using a direct commit - this will allow scheduled updates to run the way you want.
Thanks - we will be changing the functionality to automatically create a PR if it cannot update using a direct commit - this will allow scheduled updates to run the way you want.
Thank you that would be extremely helpful.
I get this error when automatic updates are sheduled, I get and error as seen below.
Error: Unexpected error when running action. Error Message: Failed to update AL-Go System Files. Make sure that the personal access token, defined in the secret called GhTokenWorkflow, is not expired and it has permission to update workflows. (Error was remote: error: GH013: Repository rule violations found for refs/heads/main. remote: Review all repository rules at http://github.com/NPSBeograd/Business-Central-Localization/rules?ref=refs%2Fheads%2Fmain remote: remote: - Changes must be made through a pull request. remote: remote: - Required status check "Pull Request Status Check" is expected. remote: To https://github.com/NPSBeograd/Business-Central-Localization ! [remote rejected] main -> main (push declined due to repository rule violations) error: failed to push some refs to 'https://github.com/NPSBeograd/Business-Central-Localization' ExitCode: 1 Commandline: git push ***github.com/NPSBeograd/Business-Central-Localization ), StackTrace: at <ScriptBlock>, D:\a\_actions\microsoft\AL-Go-Actions\v4.1\CheckForUpdates\CheckForUpdates.ps1: line 257 <- at <ScriptBlock>, D:\a\_temp\3ba9509c-8200-4816-aece-0dae26061500.ps1: line 4 <- at <ScriptBlock>, <No file>: line 1