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

Description for owner input is confusing #116

Closed
martincostello opened this issue Mar 22, 2024 · 2 comments · Fixed by #118
Closed

Description for owner input is confusing #116

martincostello opened this issue Mar 22, 2024 · 2 comments · Fixed by #118
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers released

Comments

@martincostello
Copy link
Contributor

I'm looking to migrate to this action from peter-murray/workflow-application-token-action (currently waiting on #111 for feature parity) and I found the documentation for the owner input confusing:

owner:
description: "GitHub App owner (defaults to current repository owner)"
required: false

To me, the documentation implies that this should be the owner of the GitHub app itself, whereas if you trace through the code it's actually the owner for which the GitHub app is installed (i.e. the place you want to give the app access to).

// https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-organization-installation-for-the-authenticated-app
const response = await request("GET /orgs/{org}/installation", {
org: parsedOwner,
request: {
hook: auth.hook,
},
}).catch((error) => {
/* c8 ignore next */
if (error.status !== 404) throw error;
// https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#get-a-user-installation-for-the-authenticated-app
return request("GET /users/{username}/installation", {
username: parsedOwner,
request: {
hook: auth.hook,
},
});
});

@gr2m
Copy link
Contributor

gr2m commented Mar 25, 2024

the owner for which the GitHub app is installed

that is correct. Sorry for the confusion. We should definitely update the input description. Pull request welcome!

@gr2m gr2m added bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers labels Mar 25, 2024
martincostello added a commit to martincostello/create-github-app-token that referenced this issue Mar 25, 2024
Clarify the purpose of the `owner` input.
Resolves actions#116.
@gr2m gr2m closed this as completed in #118 Mar 25, 2024
@create-app-token-action-releaser

🎉 This issue has been resolved in version 1.9.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants