Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
cbc2930
enterprise input; logic to generate ent token
theztefan Jul 8, 2025
55b8c24
tests; update README
theztefan Jul 8, 2025
3c69395
update package version
theztefan Jul 8, 2025
46f9f78
improve installation match; refactor test per copilot review
theztefan Jul 8, 2025
7434028
Update README.md
theztefan Aug 28, 2025
81e8c22
Update README.md
theztefan Aug 28, 2025
a84c82d
Update action.yml
theztefan Aug 28, 2025
7b86061
Update lib/main.js
theztefan Aug 28, 2025
3b3f07c
Update lib/main.js
theztefan Aug 28, 2025
22e6bc6
Update lib/main.js
theztefan Aug 28, 2025
6cf7b5f
update tests with enterprise-slug
theztefan Aug 28, 2025
14350b6
bump version
theztefan Aug 28, 2025
b242740
Merge origin/main into enterprise-app-enterprise-slug
parkerbxyz Mar 13, 2026
2156e19
Remove dist changes
parkerbxyz Mar 13, 2026
77d42ce
Merge latest origin/main
parkerbxyz Mar 14, 2026
4f9eedd
Use direct enterprise installation route
parkerbxyz Mar 14, 2026
c7725c0
Apply suggestions from code review
parkerbxyz Mar 14, 2026
7b114ed
Add newline to .gitignore
parkerbxyz Mar 14, 2026
f90c44a
Remove redundant enterprise tests
parkerbxyz Mar 14, 2026
9175c03
Upgrade GitHub Action to v3
parkerbxyz Mar 14, 2026
50b5a08
Stabilize stderr snapshots
parkerbxyz Mar 14, 2026
17e8e94
Build dist files for testing
parkerbxyz Mar 20, 2026
f942b77
Rename enterprise input
parkerbxyz Mar 21, 2026
c28e731
Clarify enterprise input wording
parkerbxyz Mar 21, 2026
7b2a5fb
Restore failure semantics
parkerbxyz Mar 21, 2026
a2a14fd
Simplify enterprise target flow
parkerbxyz Mar 21, 2026
8b90615
Extract installation auth helper
parkerbxyz Mar 21, 2026
de40320
Test enterprise retry path
parkerbxyz Mar 21, 2026
60ab571
Merge origin/main into enterprise-app-enterprise-slug
parkerbxyz Apr 30, 2026
806ce0a
test: simplify enterprise exclusivity tests
parkerbxyz Apr 30, 2026
22a239f
docs: use client-id in enterprise example
parkerbxyz Apr 30, 2026
9260060
fix: align owner token retry behavior
parkerbxyz Apr 30, 2026
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 .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
coverage
node_modules/
.DS_Store
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,28 @@ jobs:
body: "Hello, World!"
```

### Create a token for an enterprise installation

```yaml
on: [workflow_dispatch]

jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
enterprise: my-enterprise-slug
- name: Call enterprise management REST API with gh
run: |
gh api /enterprises/my-enterprise-slug/apps/installable_organizations
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
```

### Create a token with specific permissions

> [!NOTE]
Expand Down Expand Up @@ -356,6 +378,13 @@ steps:
> [!NOTE]
> If `owner` is set and `repositories` is empty, access will be scoped to all repositories in the provided repository owner's installation. If `owner` and `repositories` are empty, access will be scoped to only the current repository.

### `enterprise`

**Optional:** The slug version of the enterprise name to generate a token for enterprise-level app installations.

> [!NOTE]
> The `enterprise` input is mutually exclusive with `owner` and `repositories`. GitHub Apps can be installed on enterprise accounts with permissions that let them call enterprise management APIs. Enterprise installations do not grant access to organization or repository resources.

### `permission-<permission name>`

**Optional:** The permissions to grant to the token. By default, the token inherits all of the installation's permissions. We recommend to explicitly list the permissions that are required for a use case. This follows GitHub's own recommendation to [control permissions of `GITHUB_TOKEN` in workflows](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token). The documentation also lists all available permissions, just prefix the permission key with `permission-` (e.g., `pull-requests` → `permission-pull-requests`).
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ inputs:
repositories:
description: "Comma or newline-separated list of repositories to install the GitHub App on (defaults to current repository if owner is unset)"
required: false
enterprise:
description: "The slug version of the enterprise name for enterprise-level app installations (cannot be used with 'owner' or 'repositories')"
required: false
Comment thread
parkerbxyz marked this conversation as resolved.
skip-token-revoke:
description: "If true, the token will not be revoked when the current job is complete"
required: false
Expand Down
Loading