-
Notifications
You must be signed in to change notification settings - Fork 228
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
Commit does not belong to any branch #191
Comments
Hi @eng1n88r, I'll set up a debug case on my side. Could you please share the corresponding protection rules and the repository? It seams not, that you you using an PAT to bypass the branch protection rules, right? |
I tried with both Unfortunately, I could not share the repo I was working with, but I will try to create a new one as soon as I return. Regarding, the branch protection rules I have the following checked:
|
@eng1n88r Thank you for sharing your setup. That sounds like a scenario where you need a PAT. Otherwise, you can't push back to the protected branch, because only admin users or special tokens can bypass the protection rules. I'll set up a dummy repository on my side and I'll try to further debug it. FYI: I've got the feeling the issue is related to this line. If you want to continue troubleshooting, it would be helpful to try out the behavior with the |
@ZPascal Here is the public repo I created and reproduced the issue with GITHUB_TOKEN. Will try PAT in a few and |
Tested with |
Pushing to a protected branch from within GitHub actions succeeded but the commit is marked as not belonging to any branch.
I have the following workflow:
If I remove branch protection and remove
force_with_lease: true
it seems to work fine.Here are the outcomes of the actions. This log from the action with no branch protection and removed
force_with_lease
:If the branch is protected and
force_with_lease: true
is added the logs are:So the
.git
is missing fromTo https://github.com/my/repo
and there is no range of commitsd7f4784..2187bf9 HEAD -> main
.So when I open the release log, I see that commit is there:
But when I open it I see the following:
The text was updated successfully, but these errors were encountered: