-
-
Notifications
You must be signed in to change notification settings - Fork 51
feat(gh-auth): add gh auth login and credential helper #239
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
feat(gh-auth): add gh auth login and credential helper #239
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @msiebeneicher
Finally I was able to test the gh auth login --with_token call. When no token is provided, it will give an error.
Therefore I like to request some small adjustments. Would be super nice if you could do those :)
- please add another optional parameter for the action
source_repo_github_token - check in the
entrypoint.shthe existence, if it exists, init gh auth with your current PR commands
This will also enable your use case with your example with
- name: actions-template-sync
uses: AndreasAugustin/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_repo_github_token: ${{ steps.generate_token.outputs.token }}
source_repo_path: <owner/repo>Furthermore it would be lovely if you could also update the docs/ARCHITECTURE.md mermaid diagram (if possible 👍 )
Remark:
- There is a possible case that both variables are existend: ssh private key and github token. In this case the github token should be prefered (I think).
- I will afterwards add automated regression tests
Thanks a bunch for this.
5ca615f to
8c71aeb
Compare
|
@AndreasAugustin : requested and discussed changes are now implemented. Would be nice if you can test the changes for your ssh setup again. |
@msiebeneicher thanks for the changes. |
|
@all-contributors |
|
I've updated the pull request to add @msiebeneicher! 🎉 |
fix(): small fix for private repos 🐛
# This is the 1st commit message: parent 9b74224 author Andy Augustin <[email protected]> 1672219390 +0100 committer Andy Augustin <[email protected]> 1672592292 +0100 gpgsig -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEApgnwt2TStNZl6Y9UpE0XzZ/UkgFAmOxu6QACgkQUpE0XzZ/ UkjAzgv/cWh9hE7VLkLM1nVmra945WUkOfWXHnCUnrsOWsxxSOkH1r2mLxZdnWtg BlFc4RciJAB39Nv1WBUt+hGBGOdYWcV1lxgSIpn+vNXd9/5xciEThRk9T1piHj+x xnZU2rW0dLlnEnFlIX1qkKeD+rjclXw46umjMgqwIF0vQSx5cR9y8sDCiqRGg2Fv G/k/xLoQwah0Ve8nwqd6dLwNYXl8cFBfvuZaGV/dt1+5BDl4J5mPYg4trxKx5xnB fTxTQ0G/qOa1OInW04EReJWZwQaGvyx5PqEFk0ESk8MuzFytfVVRCnHwdP/QvLO7 S7Y79wUBAQfHvSlwOgBtlQc5eFOiKoxahUhJIcCMLw1r2+nRjuPAA0j07v6nmjDM sfxyVSpnYnKGAfGrYGboOHuEjqKegKdY3oIQFL/Ivln7kmLxGrFcpQ+QMTEJUsLw 2AB+Yf+tJyQXnx8AiGQRnVlXW3FRCOQhCxK2zXMUpzwAsKcKYNnaKoM6jDN7EzRQ fZrB76EK =yGb3 -----END PGP SIGNATURE----- feat(): make gh auth login conditional for separate source repo token 🚀 style(lint): fix lint issues 🐛 feat(): add PAT 🚀 feat(): add PAT 🚀 feat(): add PAT 🚀 feat(): add PAT 🚀 feat(): add PAT 🚀 feat(): add PAT 🚀 feat(): add PAT 🚀 doc(): update docs 📝 feat(): add option for PAT 🚀 feat(): add option for PAT 🚀 # This is the commit message AndreasAugustin#2: feat(): add option for PAT 🚀 # This is the commit message AndreasAugustin#3: feat(): add option for PAT 🚀 # This is the commit message AndreasAugustin#4: feat(): add option for PAT 🚀 # This is the commit message AndreasAugustin#5: feat(): add option for PAT 🚀 # This is the commit message AndreasAugustin#6: trial(): add permissions 🐛
author Andy Augustin <[email protected]> 1672219390 +0100 committer Andy Augustin <[email protected]> 1672592292 +0100 gpgsig -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEApgnwt2TStNZl6Y9UpE0XzZ/UkgFAmOxu6QACgkQUpE0XzZ/ UkjAzgv/cWh9hE7VLkLM1nVmra945WUkOfWXHnCUnrsOWsxxSOkH1r2mLxZdnWtg BlFc4RciJAB39Nv1WBUt+hGBGOdYWcV1lxgSIpn+vNXd9/5xciEThRk9T1piHj+x xnZU2rW0dLlnEnFlIX1qkKeD+rjclXw46umjMgqwIF0vQSx5cR9y8sDCiqRGg2Fv G/k/xLoQwah0Ve8nwqd6dLwNYXl8cFBfvuZaGV/dt1+5BDl4J5mPYg4trxKx5xnB fTxTQ0G/qOa1OInW04EReJWZwQaGvyx5PqEFk0ESk8MuzFytfVVRCnHwdP/QvLO7 S7Y79wUBAQfHvSlwOgBtlQc5eFOiKoxahUhJIcCMLw1r2+nRjuPAA0j07v6nmjDM sfxyVSpnYnKGAfGrYGboOHuEjqKegKdY3oIQFL/Ivln7kmLxGrFcpQ+QMTEJUsLw 2AB+Yf+tJyQXnx8AiGQRnVlXW3FRCOQhCxK2zXMUpzwAsKcKYNnaKoM6jDN7EzRQ fZrB76EK =yGb3 -----END PGP SIGNATURE----- feat(): make gh auth login conditional for separate source repo token 🚀 style(lint): fix lint issues 🐛 feat(): add PAT 🚀 feat(): add PAT 🚀 feat(): add PAT 🚀 feat(): add PAT 🚀 feat(): add PAT 🚀 feat(): add PAT 🚀 feat(): add PAT 🚀 doc(): update docs 📝 feat(): add option for PAT 🚀 feat(): add option for PAT 🚀 feat(): add option for PAT 🚀 feat(): add option for PAT 🚀 feat(): add option for PAT 🚀 feat(): add option for PAT 🚀 trial(): add permissions 🐛 trial(): new trial for accessing private repo with PAT 🆙 trial(): new trial for accessing private repo with PAT 🆙 trial(): new trial for accessing private repo with PAT 🆙 trial(): new trial for accessing private repo with PAT 🆙 trial(): new trial for accessing private repo with PAT 🆙 trial(): new trial for accessing private repo with PAT 🆙 trial(): new trial for accessing private repo with PAT 🆙 trial(): new trial for accessing private repo with PAT 🆙
d34fa01 to
d05baaf
Compare
d05baaf to
a06016d
Compare
…it_app Signed-off-by: andy Augustin <[email protected]>
Signed-off-by: andy Augustin <[email protected]>
Signed-off-by: andy Augustin <[email protected]>
Signed-off-by: andy Augustin <[email protected]>
Signed-off-by: andy Augustin <[email protected]>
Signed-off-by: andy Augustin <[email protected]>
* chore: add test for PAT 🚀 * chore(gh-cli): update gh cli version to latest 🚀 * style(lint): fix lint issues 🐛 * doc(): update docs 📝 Signed-off-by: andy Augustin <[email protected]> Co-authored-by: Marc Siebeneicher <[email protected]>
msiebeneicher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for me the PR looks fine now
reverts AndreasAugustin#239 because we need multiple tokens and are already logged in to github with another token


Description
Close #238
With this PR
ghwill be used to authenticate the repository by the usedGITHUB_TOKEN.This change is tested against GitHub Enterprise v3.5. It would be lovely if you could test it also against your setup on github.com.