Skip to content

Commit bcd2ba4

Browse files
chore(main): release 3.2.0 (#370)
🤖 I have created a release *beep* *boop* --- ## [3.2.0](v3.1.1...v3.2.0) (2026-05-12) ### Features * add support for enterprise-level GitHub Apps ([#263](#263)) ([952a2a7](952a2a7)) * support full repository names in `repositories` input ([#372](#372)) ([85eb8dd](85eb8dd)) ### Bug Fixes * **deps:** bump @actions/core from 3.0.0 to 3.0.1 in the production-dependencies group ([#364](#364)) ([43e5c34](43e5c34)) * validate private-key input ([#376](#376)) ([f24bbd8](f24bbd8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: create-app-token-action-releaser[bot] <135574722+create-app-token-action-releaser[bot]@users.noreply.github.com> Co-authored-by: parkerbxyz <[email protected]>
1 parent f24bbd8 commit bcd2ba4

5 files changed

Lines changed: 56 additions & 10 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "3.1.1"
2+
".": "3.2.0"
33
}

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
3+
## [3.2.0](https://github.com/actions/create-github-app-token/compare/v3.1.1...v3.2.0) (2026-05-12)
4+
5+
6+
### Features
7+
8+
* add support for enterprise-level GitHub Apps ([#263](https://github.com/actions/create-github-app-token/issues/263)) ([952a2a7](https://github.com/actions/create-github-app-token/commit/952a2a7073df6bfa5f49bc469ec895b6ec1acea4))
9+
* support full repository names in `repositories` input ([#372](https://github.com/actions/create-github-app-token/issues/372)) ([85eb8dd](https://github.com/actions/create-github-app-token/commit/85eb8dd41472213aed25d1a126460e0069138ab6))
10+
11+
12+
### Bug Fixes
13+
14+
* **deps:** bump @actions/core from 3.0.0 to 3.0.1 in the production-dependencies group ([#364](https://github.com/actions/create-github-app-token/issues/364)) ([43e5c34](https://github.com/actions/create-github-app-token/commit/43e5c345bfd4d4f3ecea019ad0042001a09dd857))
15+
* validate private-key input ([#376](https://github.com/actions/create-github-app-token/issues/376)) ([f24bbd8](https://github.com/actions/create-github-app-token/commit/f24bbd89643991c0de27ae823c01791b2c6bafdd))

dist/main.cjs

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23241,24 +23241,52 @@ function resolveInstallationTarget(enterprise, owner, repositories, core) {
2324123241
);
2324223242
return { type: "owner", owner };
2324323243
}
23244-
const parsedOwner = owner || String(process.env.GITHUB_REPOSITORY_OWNER);
23244+
const target = normalizeRepositoryTarget(owner, repositories);
2324523245
if (!owner) {
2324623246
core.info(
23247-
`No 'owner' input provided. Using default owner '${parsedOwner}' to create token for the following repositories:${repositories.map((repo) => `
23248-
- ${parsedOwner}/${repo}`).join("")}`
23247+
`No 'owner' input provided. Using default owner '${target.owner}' to create token for the following repositories:${target.repositories.map((repo) => `
23248+
- ${target.owner}/${repo}`).join("")}`
2324923249
);
2325023250
} else {
2325123251
core.info(
23252-
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:${repositories.map((repo) => `
23253-
- ${parsedOwner}/${repo}`).join("")}`
23252+
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:${target.repositories.map((repo) => `
23253+
- ${target.owner}/${repo}`).join("")}`
2325423254
);
2325523255
}
2325623256
return {
2325723257
type: "repository",
23258+
owner: target.owner,
23259+
repositories: target.repositories
23260+
};
23261+
}
23262+
function normalizeRepositoryTarget(owner, repositories) {
23263+
const parsedOwner = owner || String(process.env.GITHUB_REPOSITORY_OWNER);
23264+
const parsedRepositories = repositories.map(parseRepositoryInput);
23265+
const mismatchedRepository = parsedRepositories.find(
23266+
(repository) => repository.owner && repository.owner.toLowerCase() !== parsedOwner.toLowerCase()
23267+
);
23268+
if (mismatchedRepository) {
23269+
throw new Error(
23270+
`Repository '${mismatchedRepository.input}' includes owner '${mismatchedRepository.owner}', which does not match the resolved owner '${parsedOwner}'.`
23271+
);
23272+
}
23273+
return {
2325823274
owner: parsedOwner,
23259-
repositories
23275+
repositories: parsedRepositories.map((repository) => repository.name)
2326023276
};
2326123277
}
23278+
function parseRepositoryInput(input) {
23279+
const parts = input.split("/");
23280+
if (parts.length === 1 && parts[0]) {
23281+
return { input, owner: "", name: parts[0] };
23282+
}
23283+
if (parts.length === 2 && parts[0] && parts[1]) {
23284+
return { input, owner: parts[0], name: parts[1] };
23285+
}
23286+
throw new Error(
23287+
`Invalid repository '${input}'. Expected 'repository' or 'owner/repository'.`
23288+
);
23289+
}
2326223290
function getTokenRetryDescription(target) {
2326323291
switch (target.type) {
2326423292
case "enterprise":
@@ -23397,6 +23425,9 @@ async function run() {
2339723425
throw new Error("The 'client-id' (or deprecated 'app-id') input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context.");
2339823426
}
2339923427
const privateKey = getInput("private-key");
23428+
if (!privateKey) {
23429+
throw new Error("The 'private-key' input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context.");
23430+
}
2340023431
const enterprise = getInput("enterprise");
2340123432
const owner = getInput("owner");
2340223433
const repositories = getInput("repositories").split(/[\n,]+/).map((s) => s.trim()).filter((x) => x !== "");

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "create-github-app-token",
33
"private": true,
44
"type": "module",
5-
"version": "3.1.1",
5+
"version": "3.2.0",
66
"description": "GitHub Action for creating a GitHub App Installation Access Token",
77
"engines": {
88
"node": ">=24.4.0"

0 commit comments

Comments
 (0)