Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ generates for you or Base64 encode it in the secret.
* `application_id`: The GitHub Application ID that you wil be getting the access token for
* `application_private_key`: A private key generated for the GitHub Application so that you can authenticate (PEM format or base64 encoded)
* `permissions`: The optional limited permissions to request, specifying this allows you to request a subset of the permissions for the underlying GitHub Application. Defaults to all permissions available to the GitHub Application when not specified. Must be provided in a comma separated list of token permissions e.g. `issues:read, secrets:write, packages:read`
* `repository`: An optional `owner/repository` name if the GitHub Application is not installed on the repository within which the action is running.
* `organization`: An optional organization name if the GitHub Application is installed at the Organization level (instead of the repository).
* `github_api_base_url`: An optional URL to the GitHub API, this will be read and loaded from the runner environment by default, but you might be bridging access to a secondary GHES instance or from GHES to GHEC, you can utilize this to make sure the Octokit library is talking to the right GitHub instance.
* `https_proxy`: An optional proxy to use for connecting with the GitHub instance. If the runner has `HTTP_PROXY` or `HTTPS_PROXY` specified as environment variables it will attempt to use those if this parameter is not specified.
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ inputs:
description: The permissions to request e.g. issues:read,secrets:write,packages:read. Defaults to all available permissions
required: false

repository:
description: The GitHub Organization/Repository name to get the application installation for, if not specified will use the current repository instead
required: false

organization:
description: The GitHub Organization to get the application installation for, if not specified will use the current repository instead
required: false
Expand Down
2 changes: 1 addition & 1 deletion dist/main/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/actions/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ async function run() {

try {
const userSpecifiedOrganization = core.getInput('organization');
const repository = process.env['GITHUB_REPOSITORY'];
const repository = core.getInput('repository') || process.env['GITHUB_REPOSITORY'];

if (!repository || repository.trim().length === 0) {
throw new Error(`The repository value was missing from the environment as 'GITHUB_REPOSITORY'`);
throw new Error(`The repository value was missing from the input as 'repository', or the environment as 'GITHUB_REPOSITORY'`);
}

const repoParts = repository.split('/');
Expand Down