-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Does not work with Github App Token #1
Comments
I had never being tested the oauth2. Only the PAT have used: https://github.com/settings/tokens The oauth2 has a different link: https://github.com/settings/developers
Thank you for the issue. I will fix that later. |
The issue I am having is that if I use the GitHub Application token as the input value A quick test using my GitHub account seems to indicate that both a PAT and GitHub Application Token will work with the "oauth2:" syntax, or at least it worked for me :) |
* fixed: action.yml: #1: missed branch reference use
@runecalico can you recheck the issue? |
I've tested your command line and it works whenever you are using |
Hello,
Thank you for your time working on this GHA.
The following line seems to have a problem when used with a Github Application Token.
gh-action--git-checkout/action.yml
Line 48 in b678e58
When using a token from a Github Application, the if/then will result in false, setting is-repo-exists-and-has-ref to false.
If you use oauth2: or : as the value of inputs.token the check will work as expected in my case, resulting in a true result, setting is-repo-exists-and-has-ref to true.
Unfortunately, checkout/v3 DOES work with a Github Application Token - https://github.com/andry81-devops/gh-action--git-checkout/blob/master/action.yml#L67
So the workaround for the git ls-remote causes a failure with checkout/v3 :(
I do not know if you can use the oauth2: syntax when using a PAT token.
The second possible problem is that the command is not actually checking the ref input.
The command to do so should be
git ls-remote -q --exit-code "https://${{ inputs.token }}@github.com/${{ inputs.repository }}" ${{ inputs.ref }} > /dev/null 2>&1
Thank you for your time.
The text was updated successfully, but these errors were encountered: