-
Notifications
You must be signed in to change notification settings - Fork 50
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(repositoryNames) Able to filter out what repos the Installation Token has access to via repo name #279
Conversation
NickLiffen
commented
Apr 22, 2021
- Repo Name is now an option.
…Token has access to via repo name
@wolfy1339 & @gr2m no rush but when you get a chance I would love your thoughts on this pull request 👍 I welcome you to test/propose any changes 👍 I think it looks good and I have tried to make it match the style of this repository. However, welcome your feedback 💯 |
Closes #277 |
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.
This looks great so far, thank you Nick!
3 things I'd suggest we add:
-
I think I'd add a
(recommended)
to therepositoryId
option.One reason is that repository names can change, repository IDs cannot. If both are available, the user should use the ids.
Another reason is that the repository names or IDs (depending on what was passed) is used for caching IDs. Repository names can get long, repository ID lengths at least are predictable. This has an impact if e.g. Redis is used as a cache backend, but for widely used apps it could also impact memory usage.
-
Could you add a test where you set both,
repositoryIds
andrepositoryNames
, to see what happens, and to keep that behavior consistent? -
Could you add to the descriptions in the README and typescript that either
repositoryIds
orrepositoryNames
should be set, not both? You can add TypeScript descriptions to options by adding a/** comment herer */
above the option, I think
I will make the changes first thing tomorrow (UK time) and send a PR your way after. |
When in doubt, I like to stay as close as possible to GitHub's APIs. Let's just pass it through and let GitHub's API respond with a helpful error. |
Sounds good @gr2m 👍 I have made the changes 👍 Appreciate the feedback 💯 Let me know if you have any more thoughts. |
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.
Looks great, thanks a lot Nick!
🎉 This PR is included in version 3.4.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |