-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add scope input #11
Add scope input #11
Conversation
@billyvg Hi, Can you review this? |
@whywaita Ah sorry, this got lost, will take a look now, thanks |
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.
Left a note, but otherwise this looks good. Thanks!
import { createAppAuth } from "@octokit/auth-app"; | ||
import { Octokit } from "@octokit/rest"; | ||
import { Endpoints } from "@octokit/types"; | ||
import * as core from "@actions/core"; |
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.
Oops, I guess I didn't run pre-commit hooks when I committed this 🙊🙊 - thanks!
src/main.ts
Outdated
}); | ||
|
||
const {data} = await appOctokit.apps.listInstallations(); | ||
type listInstallationsResponse = Endpoints["GET /app/installations"]["response"]; |
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.
Can you move this type alias out of the function? I think it's a bit confusing to have type aliases mixed inside of runtime code.
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.
I moved in 2652b2a
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.
Thanks again!
Thank you! |
This PR added
scope
to actions input.appOctokit.apps.listInstallations()
response array of installation. This array has multiple contents when installed to multi-organization or repositories.So
scope
is a filter for an array of installation.scope
inputs often the organization name or the repository name.