Skip to content

Description for owner input is confusing #116

Closed
@martincostello

Description

@martincostello

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,
},
});
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationgood first issueGood for newcomersreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions