Skip to content
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

Merged
merged 2 commits into from
Aug 23, 2021
Merged

Add scope input #11

merged 2 commits into from
Aug 23, 2021

Conversation

whywaita
Copy link
Contributor

@whywaita whywaita commented Aug 5, 2021

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.

@whywaita
Copy link
Contributor Author

@billyvg Hi, Can you review this?

@billyvg billyvg self-requested a review August 23, 2021 13:43
@billyvg
Copy link
Member

billyvg commented Aug 23, 2021

@whywaita Ah sorry, this got lost, will take a look now, thanks

Copy link
Member

@billyvg billyvg left a 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!

Comment on lines +1 to +4
import { createAppAuth } from "@octokit/auth-app";
import { Octokit } from "@octokit/rest";
import { Endpoints } from "@octokit/types";
import * as core from "@actions/core";
Copy link
Member

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"];
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved in 2652b2a

Copy link
Member

@billyvg billyvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

@billyvg billyvg merged commit 802336f into getsentry:main Aug 23, 2021
@whywaita
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants