-
Notifications
You must be signed in to change notification settings - Fork 47
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
Support listing repositories via a Github App #222
Support listing repositories via a Github App #222
Conversation
Wow! This is huge! Thank you very much @laughedelic! I will also try to test it in my own repositories. One question though, should we be adding the |
Yes, I thought about it too, but it's a required argument for the Scala Steward CLI, so I'm not sure how to deal with it. |
The list of repos from the GitHub App and the repos file are combined. |
Great! Thanks for the clarification. So we can either have both or just create an empty file if only the app args are passed to the action. |
I like the idea of creating an empty file :) |
It works! 🚀 Here's how I tested it. I've set up a personal app and installed it in two test repositories: one public and one private. Screenshot of the installation![]() Notice that the required permissions are minimal (as documented), just enough to list repositories Then I've set up this public repo to test the action: https://github.com/laughedelic/scala-steward-runner with the reference to this branch of my fork: uses: laughedelic/scala-steward-action@gh-app-args
with:
# used to list repositories:
github-app-id: 104507
github-app-key: ${{ secrets.SCALA_STEWARD_APP_PRIVATE_KEY }}
# used to author pull requests:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} Here
In the first successful run logs you can see that it created two PRs:
P.S. I had to commit the built js files to test it. I will clean it up tomorrow and open for code review. |
@alejandrohdezma I think this is ready. Please, let me know if the docs are not clear enough or anything needs to be refactored. |
Sorry for the delay, busy week. This is great! Thank you very much for this @laughedelic, I'm definitely changing my own projects to using this approach. |
Awesome! Thanks 😊 |
Hi! I want to expose the functionality introduced in scala-steward-org/scala-steward#1766 by @xuwei-k (hat tip!). The idea is that one can create a Github App and install it in the repositories they want to update from this action.
Notice, this PR is only for using the app to list installations. It's also possible to use a GH app to authenticate, but that's another story and I will have separate PR for it.
This is a WIP, I'll think how to test it and add more details here.