-
Notifications
You must be signed in to change notification settings - Fork 230
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
Using a Github App Token instead of PAT #173
Comments
Hi @vibro, I think a switch to the master/ version to |
Hi @ZPascal thanks for getting back to me so quickly! I tried the master branch, no luck there. I also did change the order but that didn't do anything either. The git user/email is set correctly (from the original commit) but the pusher still shows as github-actions[bot] bottom is the original commit, that I used the action to cherrypick the commit, here's the cherry-pick with the right user (me) |
Hi @vibro, that's bad. I'll set up a test case to further investigate the topic. |
Thanks! I may also open a ticket with the Rules folks, it's possible that something is going wrong there too. |
@ahf90 in my screenshots here the commit is also done by my user, but in the Rules entry, it's showing up as Github actions[bot]. That is the "push" user. I would expect the "push" user to by my app, not Github actions[bot]. |
Hi @vibro, I tried to set up a test case on my end, but I need some more information. Is the GH app within an organization, or did you register it personally? What is the functionality of the app and is it possible to share the code? Also, was the commit in the branch created by the GitHub actions[bot] dummy user, or was it your own user? Would it be helpful if I created a debug release for you? I also ran test cases with a PAT from my technical user. I have customized the git user and email to my technical user in the first case. In my second case, I reverted it to the GitHub actions[bot] user. Result of the commit at the end: |
@ZPascal The GH app is within an organization, and I'm only using it to get a more functional access token that can perform more actions than a deploy token (and is not tied to a user like a PAT). My issue is with the new Ruleset functionality. In Rules, there are audits to show if an experimental rule would have passed or not. I have a rule that blocks commit to |
To my understanding @vibro, this does not sound like a problem from the push action. The corresponding user was used correctly in the commit. There is a possibility that the rule functionality evaluates the used user (token), but this would also indicate that your app passes a generalized (GH default token) and not a personalized token (e.g. impersonated Token). From my understanding, you should open an issue on the Rules side. Feel free to come back, if you need support from the GH Push Action community. |
Been troubleshooting a similar issue, and one thing I learned is that if you are using the
|
@mattbarlow-sg that was it! Worked perfectly, thanks so much. @ZPascal maybe that is worth putting in the README? If you use |
Hi @mattbarlow-sg, thanks for sharing the knowledge and solution! @vibro That sounds good. I will adjust the documentation accordingly. |
Hi @vibro & @mattbarlow-sg, FYI: I've documented the corresponding setup. @vibro Can we close the issue? |
looks great, thanks! |
I'm working with the new Ruleset feature in Github and I'm running into an issue with the push action + custom token.
I have a Github App that I have granted access to the repo. In my Rule, I also allow this application to bypass rule prohibiting pushing to a particular branch. I'm using the github-app-token action to generate a token. Rules currently do not have a way to allow github-actions[bot] to bypass them (see this discussion for more info).
I am able to push a commit fine using the push action, but when I check the rule insights, it shows the commit as coming from
github-actions[bot]
instead of my custom app. Is it possible to use a Github App token in this action?Example action:
Here's the insight showing that it came from github-actions[bot]
The text was updated successfully, but these errors were encountered: