Compare commits

...

20 Commits

Author SHA1 Message Date
semantic-release-bot 3ff1caaa28 build(release): 2.0.2 [skip ci]
## [2.0.2](https://github.com/actions/create-github-app-token/compare/v2.0.1...v2.0.2) (2025-04-03)

### Bug Fixes

* improve log messages for token creation ([#226](https://github.com/actions/create-github-app-token/issues/226)) ([eaef294](https://github.com/actions/create-github-app-token/commit/eaef29498fbc63724aabd0a6e832efd41baf2cc7))
2025-04-03 22:54:20 +00:00
Parker Brown eaef29498f fix: improve log messages for token creation (#226)
Updated log messages to provide clearer and more consistent information.
2025-04-03 15:53:46 -07:00
semantic-release-bot 86e24964d6 build(release): 2.0.1 [skip ci]
## [2.0.1](https://github.com/actions/create-github-app-token/compare/v2.0.0...v2.0.1) (2025-04-03)

### Bug Fixes

* **deps:** bump the production-dependencies group across 1 directory with 2 updates ([#228](https://github.com/actions/create-github-app-token/issues/228)) ([2411bfc](https://github.com/actions/create-github-app-token/commit/2411bfc7923448badb7a1faf23017f382e0fb895))
2025-04-03 22:43:44 +00:00
dependabot[bot] 2411bfc792 fix(deps): bump the production-dependencies group across 1 directory with 2 updates (#228)
Bumps the production-dependencies group with 2 updates in the / directory: [@octokit/auth-app](https://github.com/octokit/auth-app.js) and [undici](https://github.com/nodejs/undici).
2025-04-03 22:43:14 +00:00
dependabot[bot] f17d09a7b5 build(deps-dev): bump the development-dependencies group with 3 updates (#225)
Bumps the development-dependencies group with 3 updates: [@octokit/openapi](https://github.com/octokit/openapi),
[esbuild](https://github.com/evanw/esbuild), and [yaml](https://github.com/eemeli/yaml).
2025-04-03 15:30:01 -07:00
Parker Brown e250d17c7a ci(update-permission-inputs): add permissions (#230)
Adds `contents: write` permissions to the update-permission-inputs.yml workflow file.
2025-04-03 13:57:23 -07:00
Parker Brown ed258b491a Rename workflow 2025-04-03 13:46:42 -07:00
Parker Brown 5c652ca715 Update update-inputs.yml 2025-04-03 13:46:11 -07:00
Parker Brown 60ee75db78 ci(update-inputs): create initial version (#229)
Resolves #220.

Updates action.yml inputs after an update to the octokit/openapi dependency.
2025-04-03 12:27:14 -07:00
semantic-release-bot 064492a9a1 build(release): 2.0.0 [skip ci]
# [2.0.0](https://github.com/actions/create-github-app-token/compare/v1.12.0...v2.0.0) (2025-04-03)

* feat!: remove deprecated inputs ([#213](https://github.com/actions/create-github-app-token/issues/213)) ([5cc811b](https://github.com/actions/create-github-app-token/commit/5cc811bc40176329bb642bff9e5d9e356099ad2a))

### BREAKING CHANGES

* Removed deprecated inputs (`app_id`, `private_key`, `skip_token_revoke`) and made `app-id` and `private-key` required in the action configuration.
2025-04-03 19:10:30 +00:00
Parker Brown 5cc811bc40 feat!: remove deprecated inputs (#213)
BREAKING CHANGE: Removed deprecated inputs (`app_id`, `private_key`, `skip_token_revoke`) and made `app-id` and `private-key` required in the action configuration.
2025-04-03 12:09:57 -07:00
Parker Brown 23b44b2c8e build: update package-lock.json on release (#227)
This pull request updates the release configuration to include
package-lock.json. This should ensure the action version is update in
package-lock.json when the release workflow runs.
2025-04-03 12:08:57 -07:00
Yuta Kasai 6f3f59186f docs: delete unused badge (#222)
It seems that there is an unused badge in this repository. This badge
was introduced in
https://github.com/actions/create-github-app-token/pull/70, but after
some trial and error, it was removed from the README
(https://github.com/actions/create-github-app-token/pull/70/commits/f28f8958a77a5e1e1f036ad308ffa00c25948a97
in the PR). However, the badge itself was not deleted.

Therefore, this badge appears to be unnecessary. This patch removes it.
2025-04-03 18:41:15 +00:00
semantic-release-bot d72941d797 build(release): 1.12.0 [skip ci]
# [1.12.0](https://github.com/actions/create-github-app-token/compare/v1.11.7...v1.12.0) (2025-03-27)

### Features

* permissions ([#168](https://github.com/actions/create-github-app-token/issues/168)) ([0e0aa99](https://github.com/actions/create-github-app-token/commit/0e0aa99a86bd82ec98421533ae985fef61554361))
2025-03-27 19:01:44 +00:00
Gregor Martynus 0e0aa99a86 feat: permissions (#168)
- Load `app-permissions` from schema exported by `@octokit/openapi`
- Update documentation in README.md
- Implement the `permissions_*` inputs in the action code

---------

Co-authored-by: Parker Brown <17183625+parkerbxyz@users.noreply.github.com>
2025-03-27 19:00:54 +00:00
Josh Gross f577941506 Remove individuals form CODEOWNERS (#215)
Since we have the `@actions/create-github-app-token-maintainers`, we
don't need explicit references to individuals on that team.
2025-03-20 12:58:35 -04:00
semantic-release-bot af35edadc0 build(release): 1.11.7 [skip ci]
## [1.11.7](https://github.com/actions/create-github-app-token/compare/v1.11.6...v1.11.7) (2025-03-20)

### Bug Fixes

* **deps:** bump undici from 5.28.4 to 7.5.0 ([#214](https://github.com/actions/create-github-app-token/issues/214)) ([a24b46a](https://github.com/actions/create-github-app-token/commit/a24b46a4626bf0f67abb297b82d863218920d5e2))
2025-03-20 05:59:25 +00:00
dependabot[bot] a24b46a462 fix(deps): bump undici from 5.28.4 to 7.5.0 (#214)
Bumps [undici](https://github.com/nodejs/undici) from 5.28.4 to 7.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nodejs/undici/releases">undici's
releases</a>.</em></p>
<blockquote>
<h2>v7.5.0</h2>
<h2>What's Changed</h2>
<ul>
<li>feat(docs): button to switch dark and light mode by <a
href="https://github.com/shivarm"><code>@​shivarm</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4044">nodejs/undici#4044</a></li>
<li>feat: add mock call history to access request configuration in test
by <a href="https://github.com/blephy"><code>@​blephy</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4029">nodejs/undici#4029</a></li>
<li>fix: Fix retry-handler.js when retry-after header is a Date by <a
href="https://github.com/fgiova"><code>@​fgiova</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4084">nodejs/undici#4084</a></li>
<li>Update Cache Tests by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/4027">nodejs/undici#4027</a></li>
<li>Allow disabling autoSelectFamily in an Agent by <a
href="https://github.com/hitsthings"><code>@​hitsthings</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4070">nodejs/undici#4070</a></li>
<li>Removed clients with unrecoverable errors from the Pool by <a
href="https://github.com/mcollina"><code>@​mcollina</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4088">nodejs/undici#4088</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/blephy"><code>@​blephy</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4029">nodejs/undici#4029</a></li>
<li><a href="https://github.com/fgiova"><code>@​fgiova</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4084">nodejs/undici#4084</a></li>
<li><a
href="https://github.com/hitsthings"><code>@​hitsthings</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4070">nodejs/undici#4070</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v7.4.0...v7.5.0">https://github.com/nodejs/undici/compare/v7.4.0...v7.5.0</a></p>
<h2>v7.4.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: apply byte offset on Buffer.from by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4019">nodejs/undici#4019</a></li>
<li>fix: fetch body fallback random number generation by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4023">nodejs/undici#4023</a></li>
<li>Add release instructions by <a
href="https://github.com/mcollina"><code>@​mcollina</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4022">nodejs/undici#4022</a></li>
<li>Update Cache Tests by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/4020">nodejs/undici#4020</a></li>
<li>Update WPT by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/4011">nodejs/undici#4011</a></li>
<li>docs: document about global dispatcher and errors (<a
href="https://redirect.github.com/nodejs/undici/issues/3987">#3987</a>)
by <a href="https://github.com/zuozp8"><code>@​zuozp8</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4014">nodejs/undici#4014</a></li>
<li>docs: fix incorrect method signature of <code>onResponseError</code>
by <a href="https://github.com/tmair"><code>@​tmair</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4030">nodejs/undici#4030</a></li>
<li>feat(docs): copy to clipboard button by <a
href="https://github.com/shivarm"><code>@​shivarm</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4037">nodejs/undici#4037</a></li>
<li>don't check AbortSignal maxListeners on some node versions by <a
href="https://github.com/KhafraDev"><code>@​KhafraDev</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4045">nodejs/undici#4045</a></li>
<li>feat: mark <code>EnvHttpProxyAgent</code> as stable by <a
href="https://github.com/aduh95"><code>@​aduh95</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4049">nodejs/undici#4049</a></li>
<li>test: fix windows wpt by <a
href="https://github.com/metcoder95"><code>@​metcoder95</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4050">nodejs/undici#4050</a></li>
<li>fix: do not throw unhandled exception when data is undefined in
interceptor.reply by <a
href="https://github.com/frederikprijck"><code>@​frederikprijck</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/4036">nodejs/undici#4036</a></li>
<li>fix: handle missing vary header values by <a
href="https://github.com/gurgunday"><code>@​gurgunday</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4031">nodejs/undici#4031</a></li>
<li>Update WPT by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/4028">nodejs/undici#4028</a></li>
<li>Update WPT by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/4062">nodejs/undici#4062</a></li>
<li>fix: fix EnvHttpProxyAgent for the Node.js bundle by <a
href="https://github.com/joyeecheung"><code>@​joyeecheung</code></a> in
<a
href="https://redirect.github.com/nodejs/undici/pull/4064">nodejs/undici#4064</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/zuozp8"><code>@​zuozp8</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4014">nodejs/undici#4014</a></li>
<li><a href="https://github.com/tmair"><code>@​tmair</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4030">nodejs/undici#4030</a></li>
<li><a href="https://github.com/shivarm"><code>@​shivarm</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4037">nodejs/undici#4037</a></li>
<li><a
href="https://github.com/frederikprijck"><code>@​frederikprijck</code></a>
made their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4036">nodejs/undici#4036</a></li>
<li><a
href="https://github.com/joyeecheung"><code>@​joyeecheung</code></a>
made their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4064">nodejs/undici#4064</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v7.3.0...v7.4.0">https://github.com/nodejs/undici/compare/v7.3.0...v7.4.0</a></p>
<h2>v7.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: sqlite null ref by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4016">nodejs/undici#4016</a></li>
<li>fix: sqlite remove unnecessary parameter by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4017">nodejs/undici#4017</a></li>
<li>feat: sqlite add set and minor cleanup by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4018">nodejs/undici#4018</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/nodejs/undici/commit/a180465f3ae472d1cc860badcc36bda5566ff2a5"><code>a180465</code></a>
Bumped v7.5.0 (<a
href="https://redirect.github.com/nodejs/undici/issues/4091">#4091</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/f317618ec28753a4218beccea048bcf89c36db25"><code>f317618</code></a>
Removed clients with unrecoverable errors from the Pool (<a
href="https://redirect.github.com/nodejs/undici/issues/4088">#4088</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/1e58b58523c59fa49ce5de61fefbae6825052633"><code>1e58b58</code></a>
feat: Allow disabling autoSelectFamily in an Agent (<a
href="https://redirect.github.com/nodejs/undici/issues/4070">#4070</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/2767d0e4e9214bf36e446f82675e758c8ef2f49e"><code>2767d0e</code></a>
chore: update cache tests (<a
href="https://redirect.github.com/nodejs/undici/issues/4027">#4027</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/ef276d4a296b99f547ed563a11e74ae71bc84bc1"><code>ef276d4</code></a>
fix: Fix retry-handler.js when retry-after header is a Date (<a
href="https://redirect.github.com/nodejs/undici/issues/4084">#4084</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/61797882f210e7e6f2b34158c0f25336ff72a751"><code>6179788</code></a>
feat: add mock call history to access request configuration in test (<a
href="https://redirect.github.com/nodejs/undici/issues/4029">#4029</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/f11ae944dab697d2dc22318403200b144b4b2b91"><code>f11ae94</code></a>
feat(docs): button to switch dark and light mode (<a
href="https://redirect.github.com/nodejs/undici/issues/4044">#4044</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/6bb527e9d768c5ca5b98765c28cf403ad8b250fb"><code>6bb527e</code></a>
Bumped v7.4.0 (<a
href="https://redirect.github.com/nodejs/undici/issues/4071">#4071</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/a217002369c403f5a84a870520294435632ef6eb"><code>a217002</code></a>
fix: fix EnvHttpProxyAgent for the Node.js bundle (<a
href="https://redirect.github.com/nodejs/undici/issues/4064">#4064</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/782f06b1ec44043f858b8ad1f76225919ecd55db"><code>782f06b</code></a>
chore: update WPT (<a
href="https://redirect.github.com/nodejs/undici/issues/4062">#4062</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/nodejs/undici/compare/v5.28.4...v7.5.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=undici&package-manager=npm_and_yarn&previous-version=5.28.4&new-version=7.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/actions/create-github-app-token/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-19 22:58:51 -07:00
semantic-release-bot 21cfef2b49 build(release): 1.11.6 [skip ci]
## [1.11.6](https://github.com/actions/create-github-app-token/compare/v1.11.5...v1.11.6) (2025-03-03)

### Bug Fixes

* **deps:** bump the production-dependencies group with 2 updates ([#210](https://github.com/actions/create-github-app-token/issues/210)) ([1ff1dea](https://github.com/actions/create-github-app-token/commit/1ff1dea6a9d1de5b4795e5314291e04acc63c38b))
2025-03-03 01:13:50 +00:00
dependabot[bot] 1ff1dea6a9 fix(deps): bump the production-dependencies group with 2 updates (#210)
Bumps the production-dependencies group with 2 updates:
[@octokit/auth-app](https://github.com/octokit/auth-app.js) and
[undici](https://github.com/nodejs/undici).

Updates `@octokit/auth-app` from 7.1.4 to 7.1.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/octokit/auth-app.js/releases"><code>@​octokit/auth-app</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v7.1.5</h2>
<h2><a
href="https://github.com/octokit/auth-app.js/compare/v7.1.4...v7.1.5">7.1.5</a>
(2025-02-15)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> update octokit dependencies to mitigate ReDos
vulnerability [security] (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/678">#678</a>)
(<a
href="https://github.com/octokit/auth-app.js/commit/499d1f62ce315cf04ce2a238917003ab0ff96064">499d1f6</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/octokit/auth-app.js/commit/499d1f62ce315cf04ce2a238917003ab0ff96064"><code>499d1f6</code></a>
fix(deps): update octokit dependencies to mitigate ReDos vulnerability
[secur...</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/d971a533cbd888d89a5cefd272ad8353760bf094"><code>d971a53</code></a>
chore(deps): update dependency prettier to v3.5.1 (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/673">#673</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/b68bbc3c9e593d1505fb4c17ee251b0adeee4add"><code>b68bbc3</code></a>
chore(deps): update dependency esbuild to ^0.25.0 (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/672">#672</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/7e719d412e16250cf2a4358d5b60fa0dc70b5e94"><code>7e719d4</code></a>
build(deps-dev): bump vitest, <code>@​vitest/coverage-v8</code> and
<code>@​vitest/ui</code> (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/671">#671</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/08dd3cf80ac14686d5b713f62a7a8962d53254e7"><code>08dd3cf</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/670">#670</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/870cb26a39d86a37b7c5b63b8043981b0dd1c537"><code>870cb26</code></a>
build(deps-dev): bump vite from 5.4.11 to 5.4.14 (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/669">#669</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/e64d7184187958fe8314ec09027209aca91bd226"><code>e64d718</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/668">#668</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/f20db49b47d22d6a4045e26ad9a44e9e06008425"><code>f20db49</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/666">#666</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/7e34dce9c1a7a864c3c152fc9f47fcda5075d9d9"><code>7e34dce</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/664">#664</a>)</li>
<li>See full diff in <a
href="https://github.com/octokit/auth-app.js/compare/v7.1.4...v7.1.5">compare
view</a></li>
</ul>
</details>
<br />

Updates `undici` from 7.3.0 to 7.4.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nodejs/undici/releases">undici's
releases</a>.</em></p>
<blockquote>
<h2>v7.4.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: apply byte offset on Buffer.from by <a
href="https://github.com/ronag"><code>@​ronag</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4019">nodejs/undici#4019</a></li>
<li>fix: fetch body fallback random number generation by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4023">nodejs/undici#4023</a></li>
<li>Add release instructions by <a
href="https://github.com/mcollina"><code>@​mcollina</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4022">nodejs/undici#4022</a></li>
<li>Update Cache Tests by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/4020">nodejs/undici#4020</a></li>
<li>Update WPT by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/4011">nodejs/undici#4011</a></li>
<li>docs: document about global dispatcher and errors (<a
href="https://redirect.github.com/nodejs/undici/issues/3987">#3987</a>)
by <a href="https://github.com/zuozp8"><code>@​zuozp8</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4014">nodejs/undici#4014</a></li>
<li>docs: fix incorrect method signature of <code>onResponseError</code>
by <a href="https://github.com/tmair"><code>@​tmair</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4030">nodejs/undici#4030</a></li>
<li>feat(docs): copy to clipboard button by <a
href="https://github.com/shivarm"><code>@​shivarm</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4037">nodejs/undici#4037</a></li>
<li>don't check AbortSignal maxListeners on some node versions by <a
href="https://github.com/KhafraDev"><code>@​KhafraDev</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4045">nodejs/undici#4045</a></li>
<li>feat: mark <code>EnvHttpProxyAgent</code> as stable by <a
href="https://github.com/aduh95"><code>@​aduh95</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4049">nodejs/undici#4049</a></li>
<li>test: fix windows wpt by <a
href="https://github.com/metcoder95"><code>@​metcoder95</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4050">nodejs/undici#4050</a></li>
<li>fix: do not throw unhandled exception when data is undefined in
interceptor.reply by <a
href="https://github.com/frederikprijck"><code>@​frederikprijck</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/4036">nodejs/undici#4036</a></li>
<li>fix: handle missing vary header values by <a
href="https://github.com/gurgunday"><code>@​gurgunday</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4031">nodejs/undici#4031</a></li>
<li>Update WPT by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/4028">nodejs/undici#4028</a></li>
<li>Update WPT by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/4062">nodejs/undici#4062</a></li>
<li>fix: fix EnvHttpProxyAgent for the Node.js bundle by <a
href="https://github.com/joyeecheung"><code>@​joyeecheung</code></a> in
<a
href="https://redirect.github.com/nodejs/undici/pull/4064">nodejs/undici#4064</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/zuozp8"><code>@​zuozp8</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4014">nodejs/undici#4014</a></li>
<li><a href="https://github.com/tmair"><code>@​tmair</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4030">nodejs/undici#4030</a></li>
<li><a href="https://github.com/shivarm"><code>@​shivarm</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4037">nodejs/undici#4037</a></li>
<li><a
href="https://github.com/frederikprijck"><code>@​frederikprijck</code></a>
made their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4036">nodejs/undici#4036</a></li>
<li><a
href="https://github.com/joyeecheung"><code>@​joyeecheung</code></a>
made their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/4064">nodejs/undici#4064</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v7.3.0...v7.4.0">https://github.com/nodejs/undici/compare/v7.3.0...v7.4.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/nodejs/undici/commit/6bb527e9d768c5ca5b98765c28cf403ad8b250fb"><code>6bb527e</code></a>
Bumped v7.4.0 (<a
href="https://redirect.github.com/nodejs/undici/issues/4071">#4071</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/a217002369c403f5a84a870520294435632ef6eb"><code>a217002</code></a>
fix: fix EnvHttpProxyAgent for the Node.js bundle (<a
href="https://redirect.github.com/nodejs/undici/issues/4064">#4064</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/782f06b1ec44043f858b8ad1f76225919ecd55db"><code>782f06b</code></a>
chore: update WPT (<a
href="https://redirect.github.com/nodejs/undici/issues/4062">#4062</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/608d5f6683b70576aa8dc0fb87a3514f370c28d5"><code>608d5f6</code></a>
chore: update WPT (<a
href="https://redirect.github.com/nodejs/undici/issues/4028">#4028</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/4269dabb6c8a7027c0bcb7c7d24e7a09c90549cb"><code>4269dab</code></a>
fix: handle missing vary header values (<a
href="https://redirect.github.com/nodejs/undici/issues/4031">#4031</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/c14781c6a9106cec8276db8741ad0b9b396ebf9b"><code>c14781c</code></a>
fix: do not throw unhandled exception when data is undefined in
interceptor.r...</li>
<li><a
href="https://github.com/nodejs/undici/commit/c7f3d77011234fe243c317ada1398044032342cc"><code>c7f3d77</code></a>
test: fix windows wpt (<a
href="https://redirect.github.com/nodejs/undici/issues/4050">#4050</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/f7986284fa817e6e96fa55f24d6a9b6361251785"><code>f798628</code></a>
feat: mark <code>EnvHttpProxyAgent</code> as stable (<a
href="https://redirect.github.com/nodejs/undici/issues/4049">#4049</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/d685d387f4b2b23ae0b81ce3a8e97a63bcaad80f"><code>d685d38</code></a>
don't check AbortSignal maxListeners on some node versions (<a
href="https://redirect.github.com/nodejs/undici/issues/4045">#4045</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/a9176c9ec67b3efa1732799d18162c3a4307164e"><code>a9176c9</code></a>
feat(docs): copy to clipboard button (<a
href="https://redirect.github.com/nodejs/undici/issues/4037">#4037</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/nodejs/undici/compare/v7.3.0...v7.4.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 17:13:18 -08:00
29 changed files with 2612 additions and 1146 deletions
+1 -1
View File
@@ -1 +1 @@
* @gr2m @parkerbxyz @actions/create-github-app-token-maintainers
* @actions/create-github-app-token-maintainers
@@ -0,0 +1,33 @@
name: Update Permission Inputs
on:
pull_request:
paths:
- 'package.json'
- 'package-lock.json'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
update-permission-inputs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run permission inputs update script
run: node scripts/update-permission-inputs.js
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
with:
commit_message: 'feat: update permission inputs'
+15
View File
@@ -0,0 +1,15 @@
# Contributing
Initial setup
```console
npm install
```
Run tests locally
```console
npm test
```
Learn more about how the tests work in [test/README.md](test/README.md).
+53 -17
View File
@@ -121,7 +121,7 @@ jobs:
> [!TIP]
> The `<BOT USER ID>` is the numeric user ID of the app's bot user, which can be found under `https://api.github.com/users/<app-slug>%5Bbot%5D`.
>
>
> For example, we can check at `https://api.github.com/users/dependabot[bot]` to see the user ID of Dependabot is 49699333.
>
> Alternatively, you can use the [octokit/request-action](https://github.com/octokit/request-action) to get the ID.
@@ -195,6 +195,32 @@ jobs:
body: "Hello, World!"
```
### Create a token with specific permissions
> [!NOTE]
> Selected permissions must be granted to the installation of the specified app and repository owner. Setting a permission that the installation does not have will result in an error.
```yaml
on: [issues]
jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
permission-issues: write
- uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ steps.app-token.outputs.token }}
issue-number: ${{ github.event.issue.number }}
body: "Hello, World!"
```
### Create tokens for multiple user or organization accounts
You can use a matrix strategy to create tokens for multiple user or organization accounts.
@@ -251,23 +277,23 @@ jobs:
runs-on: self-hosted
steps:
- name: Create GitHub App token
id: create_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.GHES_APP_ID }}
private-key: ${{ secrets.GHES_APP_PRIVATE_KEY }}
owner: ${{ vars.GHES_INSTALLATION_ORG }}
github-api-url: ${{ vars.GITHUB_API_URL }}
- name: Create GitHub App token
id: create_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.GHES_APP_ID }}
private-key: ${{ secrets.GHES_APP_PRIVATE_KEY }}
owner: ${{ vars.GHES_INSTALLATION_ORG }}
github-api-url: ${{ vars.GITHUB_API_URL }}
- name: Create issue
uses: octokit/request-action@v2.x
with:
route: POST /repos/${{ github.repository }}/issues
title: "New issue from workflow"
body: "This is a new issue created from a GitHub Action workflow."
env:
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
- name: Create issue
uses: octokit/request-action@v2.x
with:
route: POST /repos/${{ github.repository }}/issues
title: "New issue from workflow"
body: "This is a new issue created from a GitHub Action workflow."
env:
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
```
## Inputs
@@ -309,6 +335,12 @@ 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.
### `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`).
The reason we define one `permision-<permission name>` input per permission is to benefit from type intelligence and input validation built into GitHub's action runner.
### `skip-token-revoke`
**Optional:** If truthy, the token will not be revoked when the current job is complete.
@@ -344,6 +376,10 @@ The action creates an installation access token using [the `POST /app/installati
> [!NOTE]
> Installation permissions can differ from the app's permissions they belong to. Installation permissions are set when an app is installed on an account. When the app adds more permissions after the installation, an account administrator will have to approve the new permissions before they are set on the installation.
## Contributing
[CONTRIBUTING.md](CONTRIBUTING.md)
## License
[MIT](LICENSE)
+100 -14
View File
@@ -7,18 +7,10 @@ branding:
inputs:
app-id:
description: "GitHub App ID"
required: false # TODO: When 'app_id' is removed, make 'app-id' required
app_id:
description: "GitHub App ID"
required: false
deprecationMessage: "'app_id' is deprecated and will be removed in a future version. Use 'app-id' instead."
required: true
private-key:
description: "GitHub App private key"
required: false # TODO: When 'private_key' is removed, make 'private-key' required
private_key:
description: "GitHub App private key"
required: false
deprecationMessage: "'private_key' is deprecated and will be removed in a future version. Use 'private-key' instead."
required: true
owner:
description: "The owner of the GitHub App installation (defaults to current repository owner)"
required: false
@@ -28,15 +20,109 @@ inputs:
skip-token-revoke:
description: "If truthy, the token will not be revoked when the current job is complete"
required: false
skip_token_revoke:
description: "If truthy, the token will not be revoked when the current job is complete"
required: false
deprecationMessage: "'skip_token_revoke' is deprecated and will be removed in a future version. Use 'skip-token-revoke' instead."
# Make GitHub API configurable to support non-GitHub Cloud use cases
# see https://github.com/actions/create-github-app-token/issues/77
github-api-url:
description: The URL of the GitHub REST API.
default: ${{ github.api_url }}
# <START GENERATED PERMISSIONS INPUTS>
permission-actions:
description: "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be set to 'read' or 'write'."
permission-administration:
description: "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be set to 'read' or 'write'."
permission-checks:
description: "The level of permission to grant the access token for checks on code. Can be set to 'read' or 'write'."
permission-codespaces:
description: "The level of permission to grant the access token to create, edit, delete, and list Codespaces. Can be set to 'read' or 'write'."
permission-contents:
description: "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be set to 'read' or 'write'."
permission-dependabot-secrets:
description: "The level of permission to grant the access token to manage Dependabot secrets. Can be set to 'read' or 'write'."
permission-deployments:
description: "The level of permission to grant the access token for deployments and deployment statuses. Can be set to 'read' or 'write'."
permission-email-addresses:
description: "The level of permission to grant the access token to manage the email addresses belonging to a user. Can be set to 'read' or 'write'."
permission-environments:
description: "The level of permission to grant the access token for managing repository environments. Can be set to 'read' or 'write'."
permission-followers:
description: "The level of permission to grant the access token to manage the followers belonging to a user. Can be set to 'read' or 'write'."
permission-git-ssh-keys:
description: "The level of permission to grant the access token to manage git SSH keys. Can be set to 'read' or 'write'."
permission-gpg-keys:
description: "The level of permission to grant the access token to view and manage GPG keys belonging to a user. Can be set to 'read' or 'write'."
permission-interaction-limits:
description: "The level of permission to grant the access token to view and manage interaction limits on a repository. Can be set to 'read' or 'write'."
permission-issues:
description: "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be set to 'read' or 'write'."
permission-members:
description: "The level of permission to grant the access token for organization teams and members. Can be set to 'read' or 'write'."
permission-metadata:
description: "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be set to 'read' or 'write'."
permission-organization-administration:
description: "The level of permission to grant the access token to manage access to an organization. Can be set to 'read' or 'write'."
permission-organization-announcement-banners:
description: "The level of permission to grant the access token to view and manage announcement banners for an organization. Can be set to 'read' or 'write'."
permission-organization-copilot-seat-management:
description: "The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change. Can be set to 'write'."
permission-organization-custom-org-roles:
description: "The level of permission to grant the access token for custom organization roles management. Can be set to 'read' or 'write'."
permission-organization-custom-properties:
description: "The level of permission to grant the access token for custom property management. Can be set to 'read', 'write', or 'admin'."
permission-organization-custom-roles:
description: "The level of permission to grant the access token for custom repository roles management. Can be set to 'read' or 'write'."
permission-organization-events:
description: "The level of permission to grant the access token to view events triggered by an activity in an organization. Can be set to 'read'."
permission-organization-hooks:
description: "The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be set to 'read' or 'write'."
permission-organization-packages:
description: "The level of permission to grant the access token for organization packages published to GitHub Packages. Can be set to 'read' or 'write'."
permission-organization-personal-access-token-requests:
description: "The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. Can be set to 'read' or 'write'."
permission-organization-personal-access-tokens:
description: "The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. Can be set to 'read' or 'write'."
permission-organization-plan:
description: "The level of permission to grant the access token for viewing an organization's plan. Can be set to 'read'."
permission-organization-projects:
description: "The level of permission to grant the access token to manage organization projects and projects public preview (where available). Can be set to 'read', 'write', or 'admin'."
permission-organization-secrets:
description: "The level of permission to grant the access token to manage organization secrets. Can be set to 'read' or 'write'."
permission-organization-self-hosted-runners:
description: "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be set to 'read' or 'write'."
permission-organization-user-blocking:
description: "The level of permission to grant the access token to view and manage users blocked by the organization. Can be set to 'read' or 'write'."
permission-packages:
description: "The level of permission to grant the access token for packages published to GitHub Packages. Can be set to 'read' or 'write'."
permission-pages:
description: "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be set to 'read' or 'write'."
permission-profile:
description: "The level of permission to grant the access token to manage the profile settings belonging to a user. Can be set to 'write'."
permission-pull-requests:
description: "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be set to 'read' or 'write'."
permission-repository-custom-properties:
description: "The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. Can be set to 'read' or 'write'."
permission-repository-hooks:
description: "The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be set to 'read' or 'write'."
permission-repository-projects:
description: "The level of permission to grant the access token to manage repository projects, columns, and cards. Can be set to 'read', 'write', or 'admin'."
permission-secret-scanning-alerts:
description: "The level of permission to grant the access token to view and manage secret scanning alerts. Can be set to 'read' or 'write'."
permission-secrets:
description: "The level of permission to grant the access token to manage repository secrets. Can be set to 'read' or 'write'."
permission-security-events:
description: "The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be set to 'read' or 'write'."
permission-single-file:
description: "The level of permission to grant the access token to manage just a single file. Can be set to 'read' or 'write'."
permission-starring:
description: "The level of permission to grant the access token to list and manage repositories a user is starring. Can be set to 'read' or 'write'."
permission-statuses:
description: "The level of permission to grant the access token for commit statuses. Can be set to 'read' or 'write'."
permission-team-discussions:
description: "The level of permission to grant the access token to manage team discussions and related comments. Can be set to 'read' or 'write'."
permission-vulnerability-alerts:
description: "The level of permission to grant the access token to manage Dependabot alerts. Can be set to 'read' or 'write'."
permission-workflows:
description: "The level of permission to grant the access token to update GitHub Actions workflow files. Can be set to 'write'."
# <END GENERATED PERMISSIONS INPUTS>
outputs:
token:
description: "GitHub installation access token"
-25
View File
@@ -1,25 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="106"
height="20" role="img" aria-label="Coverage: 100%">
<title>Coverage: 100%</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<clipPath id="r">
<rect width="106" height="20" rx="3" fill="#fff" />
</clipPath>
<g clip-path="url(#r)">
<rect width="63" height="20" fill="#555" />
<rect x="63" width="43" height="20" fill="#4c1" />
<rect width="106" height="20" fill="url(#s)" />
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif"
text-rendering="geometricPrecision" font-size="110">
<text aria-hidden="true" x="325" y="150" fill="#010101" fill-opacity=".3"
transform="scale(.1)" textLength="530">Coverage</text>
<text x="325" y="140" transform="scale(.1)" fill="#fff" textLength="530">Coverage</text>
<text aria-hidden="true" x="835" y="150" fill="#010101" fill-opacity=".3"
transform="scale(.1)" textLength="330">100%</text>
<text x="835" y="140" transform="scale(.1)" fill="#fff" textLength="330">100%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

+828 -433
View File
File diff suppressed because it is too large Load Diff
+736 -369
View File
File diff suppressed because it is too large Load Diff
+23
View File
@@ -0,0 +1,23 @@
/**
* Finds all permissions passed via `permision-*` inputs and turns them into an object.
*
* @see https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#inputs
* @param {NodeJS.ProcessEnv} env
* @returns {undefined | Record<string, string>}
*/
export function getPermissionsFromInputs(env) {
return Object.entries(env).reduce((permissions, [key, value]) => {
if (!key.startsWith("INPUT_PERMISSION_")) return permissions;
const permission = key.slice("INPUT_PERMISSION_".length).toLowerCase();
if (permissions === undefined) {
return { [permission]: value };
}
return {
// @ts-expect-error - needs to be typed correctly
...permissions,
[permission]: value,
};
}, undefined);
}
+17 -12
View File
@@ -6,6 +6,7 @@ import pRetry from "p-retry";
* @param {string} privateKey
* @param {string} owner
* @param {string[]} repositories
* @param {undefined | Record<string, string>} permissions
* @param {import("@actions/core")} core
* @param {import("@octokit/auth-app").createAppAuth} createAppAuth
* @param {import("@octokit/request").request} request
@@ -16,6 +17,7 @@ export async function main(
privateKey,
owner,
repositories,
permissions,
core,
createAppAuth,
request,
@@ -31,7 +33,7 @@ export async function main(
parsedRepositoryNames = [repo];
core.info(
`owner and repositories not set, creating token for the current repository ("${repo}")`
`Inputs 'owner' and 'repositories' are not set. Creating token for this repository (${owner}/${repo}).`
);
}
@@ -40,7 +42,7 @@ export async function main(
parsedOwner = owner;
core.info(
`repositories not set, creating token for all repositories for given owner "${owner}"`
`Input 'repositories' is not set. Creating token for all repositories owned by ${owner}.`
);
}
@@ -50,9 +52,9 @@ export async function main(
parsedRepositoryNames = repositories;
core.info(
`owner not set, creating owner for given repositories "${repositories.join(
","
)}" in current owner ("${parsedOwner}")`
`No 'owner' input provided. Using default owner '${parsedOwner}' to create token for the following repositories:${repositories
.map((repo) => `\n- ${parsedOwner}/${repo}`)
.join("")}`
);
}
@@ -62,9 +64,8 @@ export async function main(
parsedRepositoryNames = repositories;
core.info(
`owner and repositories set, creating token for repositories "${repositories.join(
","
)}" owned by "${owner}"`
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
${repositories.map((repo) => `\n- ${parsedOwner}/${repo}`).join("")}`
);
}
@@ -84,7 +85,8 @@ export async function main(
request,
auth,
parsedOwner,
parsedRepositoryNames
parsedRepositoryNames,
permissions
),
{
onFailedAttempt: (error) => {
@@ -100,7 +102,7 @@ export async function main(
} else {
// Otherwise get the installation for the owner, which can either be an organization or a user account
({ authentication, installationId, appSlug } = await pRetry(
() => getTokenFromOwner(request, auth, parsedOwner),
() => getTokenFromOwner(request, auth, parsedOwner, permissions),
{
onFailedAttempt: (error) => {
core.info(
@@ -126,7 +128,7 @@ export async function main(
}
}
async function getTokenFromOwner(request, auth, parsedOwner) {
async function getTokenFromOwner(request, auth, parsedOwner, permissions) {
// https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#get-a-user-installation-for-the-authenticated-app
// This endpoint works for both users and organizations
const response = await request("GET /users/{username}/installation", {
@@ -140,6 +142,7 @@ async function getTokenFromOwner(request, auth, parsedOwner) {
const authentication = await auth({
type: "installation",
installationId: response.data.id,
permissions,
});
const installationId = response.data.id;
@@ -152,7 +155,8 @@ async function getTokenFromRepository(
request,
auth,
parsedOwner,
parsedRepositoryNames
parsedRepositoryNames,
permissions
) {
// https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#get-a-repository-installation-for-the-authenticated-app
const response = await request("GET /repos/{owner}/{repo}/installation", {
@@ -168,6 +172,7 @@ async function getTokenFromRepository(
type: "installation",
installationId: response.data.id,
repositoryNames: parsedRepositoryNames,
permissions,
});
const installationId = response.data.id;
+2 -5
View File
@@ -5,9 +5,7 @@
* @param {import("@octokit/request").request} request
*/
export async function post(core, request) {
const skipTokenRevoke = Boolean(
core.getInput("skip-token-revoke") || core.getInput("skip_token_revoke")
);
const skipTokenRevoke = Boolean(core.getInput("skip-token-revoke"));
if (skipTokenRevoke) {
core.info("Token revocation was skipped");
@@ -35,8 +33,7 @@ export async function post(core, request) {
});
core.info("Token revoked");
} catch (error) {
core.warning(
`Token revocation failed: ${error.message}`)
core.warning(`Token revocation failed: ${error.message}`);
}
}
+1 -1
View File
@@ -17,7 +17,7 @@ const proxyUrl =
const proxyFetch = (url, options) => {
const urlHost = new URL(url).hostname;
const noProxy = (process.env.no_proxy || process.env.NO_PROXY || "").split(
","
",",
);
if (!noProxy.includes(urlHost)) {
+14 -18
View File
@@ -3,6 +3,7 @@
import core from "@actions/core";
import { createAppAuth } from "@octokit/auth-app";
import { getPermissionsFromInputs } from "./lib/get-permissions-from-inputs.js";
import { main } from "./lib/main.js";
import request from "./lib/request.js";
@@ -14,35 +15,30 @@ if (!process.env.GITHUB_REPOSITORY_OWNER) {
throw new Error("GITHUB_REPOSITORY_OWNER missing, must be set to '<owner>'");
}
const appId = core.getInput("app-id") || core.getInput("app_id");
if (!appId) {
// The 'app_id' input was previously required, but it and 'app-id' are both optional now, until the former is removed. Still, we want to ensure that at least one of them is set.
throw new Error("Input required and not supplied: app-id");
}
const privateKey = core.getInput("private-key") || core.getInput("private_key");
if (!privateKey) {
// The 'private_key' input was previously required, but it and 'private-key' are both optional now, until the former is removed. Still, we want to ensure that at least one of them is set.
throw new Error("Input required and not supplied: private-key");
}
const appId = core.getInput("app-id");
const privateKey = core.getInput("private-key");
const owner = core.getInput("owner");
const repositories = core.getInput("repositories")
const repositories = core
.getInput("repositories")
.split(/[\n,]+/)
.map(s => s.trim())
.filter(x => x !== '');
.map((s) => s.trim())
.filter((x) => x !== "");
const skipTokenRevoke = Boolean(
core.getInput("skip-token-revoke") || core.getInput("skip_token_revoke")
);
const skipTokenRevoke = Boolean(core.getInput("skip-token-revoke"));
main(
const permissions = getPermissionsFromInputs(process.env);
// Export promise for testing
export default main(
appId,
privateKey,
owner,
repositories,
permissions,
core,
createAppAuth,
request,
skipTokenRevoke
skipTokenRevoke,
).catch((error) => {
/* c8 ignore next 3 */
console.error(error);
+170 -155
View File
@@ -1,29 +1,30 @@
{
"name": "create-github-app-token",
"version": "1.11.4",
"version": "2.0.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "create-github-app-token",
"version": "1.11.4",
"version": "2.0.2",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.11.1",
"@octokit/auth-app": "^7.1.4",
"@octokit/auth-app": "^7.2.0",
"@octokit/request": "^9.2.2",
"p-retry": "^6.2.1",
"undici": "^7.3.0"
"undici": "^7.7.0"
},
"devDependencies": {
"@octokit/openapi": "^18.2.0",
"@sinonjs/fake-timers": "^14.0.0",
"ava": "^6.2.0",
"c8": "^10.1.3",
"dotenv": "^16.4.7",
"esbuild": "^0.25.0",
"esbuild": "^0.25.2",
"execa": "^9.5.2",
"open-cli": "^8.0.0",
"yaml": "^2.7.0"
"yaml": "^2.7.1"
}
},
"node_modules/@actions/core": {
@@ -53,9 +54,10 @@
}
},
"node_modules/@actions/http-client/node_modules/undici": {
"version": "5.28.4",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz",
"integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==",
"version": "5.29.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
"license": "MIT",
"dependencies": {
"@fastify/busboy": "^2.0.0"
},
@@ -78,9 +80,9 @@
}
},
"node_modules/@esbuild/aix-ppc64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz",
"integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz",
"integrity": "sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==",
"cpu": [
"ppc64"
],
@@ -95,9 +97,9 @@
}
},
"node_modules/@esbuild/android-arm": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz",
"integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.2.tgz",
"integrity": "sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==",
"cpu": [
"arm"
],
@@ -112,9 +114,9 @@
}
},
"node_modules/@esbuild/android-arm64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz",
"integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.2.tgz",
"integrity": "sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==",
"cpu": [
"arm64"
],
@@ -129,9 +131,9 @@
}
},
"node_modules/@esbuild/android-x64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz",
"integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.2.tgz",
"integrity": "sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==",
"cpu": [
"x64"
],
@@ -146,9 +148,9 @@
}
},
"node_modules/@esbuild/darwin-arm64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz",
"integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz",
"integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==",
"cpu": [
"arm64"
],
@@ -163,9 +165,9 @@
}
},
"node_modules/@esbuild/darwin-x64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz",
"integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.2.tgz",
"integrity": "sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==",
"cpu": [
"x64"
],
@@ -180,9 +182,9 @@
}
},
"node_modules/@esbuild/freebsd-arm64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz",
"integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.2.tgz",
"integrity": "sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==",
"cpu": [
"arm64"
],
@@ -197,9 +199,9 @@
}
},
"node_modules/@esbuild/freebsd-x64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz",
"integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.2.tgz",
"integrity": "sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==",
"cpu": [
"x64"
],
@@ -214,9 +216,9 @@
}
},
"node_modules/@esbuild/linux-arm": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz",
"integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.2.tgz",
"integrity": "sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==",
"cpu": [
"arm"
],
@@ -231,9 +233,9 @@
}
},
"node_modules/@esbuild/linux-arm64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz",
"integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.2.tgz",
"integrity": "sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==",
"cpu": [
"arm64"
],
@@ -248,9 +250,9 @@
}
},
"node_modules/@esbuild/linux-ia32": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz",
"integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.2.tgz",
"integrity": "sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==",
"cpu": [
"ia32"
],
@@ -265,9 +267,9 @@
}
},
"node_modules/@esbuild/linux-loong64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz",
"integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.2.tgz",
"integrity": "sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==",
"cpu": [
"loong64"
],
@@ -282,9 +284,9 @@
}
},
"node_modules/@esbuild/linux-mips64el": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz",
"integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.2.tgz",
"integrity": "sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==",
"cpu": [
"mips64el"
],
@@ -299,9 +301,9 @@
}
},
"node_modules/@esbuild/linux-ppc64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz",
"integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.2.tgz",
"integrity": "sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==",
"cpu": [
"ppc64"
],
@@ -316,9 +318,9 @@
}
},
"node_modules/@esbuild/linux-riscv64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz",
"integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.2.tgz",
"integrity": "sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==",
"cpu": [
"riscv64"
],
@@ -333,9 +335,9 @@
}
},
"node_modules/@esbuild/linux-s390x": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz",
"integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.2.tgz",
"integrity": "sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==",
"cpu": [
"s390x"
],
@@ -350,9 +352,9 @@
}
},
"node_modules/@esbuild/linux-x64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz",
"integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.2.tgz",
"integrity": "sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==",
"cpu": [
"x64"
],
@@ -367,9 +369,9 @@
}
},
"node_modules/@esbuild/netbsd-arm64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz",
"integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.2.tgz",
"integrity": "sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==",
"cpu": [
"arm64"
],
@@ -384,9 +386,9 @@
}
},
"node_modules/@esbuild/netbsd-x64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz",
"integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.2.tgz",
"integrity": "sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==",
"cpu": [
"x64"
],
@@ -401,9 +403,9 @@
}
},
"node_modules/@esbuild/openbsd-arm64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz",
"integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.2.tgz",
"integrity": "sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==",
"cpu": [
"arm64"
],
@@ -418,9 +420,9 @@
}
},
"node_modules/@esbuild/openbsd-x64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz",
"integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.2.tgz",
"integrity": "sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==",
"cpu": [
"x64"
],
@@ -435,9 +437,9 @@
}
},
"node_modules/@esbuild/sunos-x64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz",
"integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.2.tgz",
"integrity": "sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==",
"cpu": [
"x64"
],
@@ -452,9 +454,9 @@
}
},
"node_modules/@esbuild/win32-arm64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz",
"integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.2.tgz",
"integrity": "sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==",
"cpu": [
"arm64"
],
@@ -469,9 +471,9 @@
}
},
"node_modules/@esbuild/win32-ia32": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz",
"integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.2.tgz",
"integrity": "sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==",
"cpu": [
"ia32"
],
@@ -486,9 +488,9 @@
}
},
"node_modules/@esbuild/win32-x64": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz",
"integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.2.tgz",
"integrity": "sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==",
"cpu": [
"x64"
],
@@ -670,16 +672,16 @@
}
},
"node_modules/@octokit/auth-app": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.1.4.tgz",
"integrity": "sha512-5F+3l/maq9JfWQ4bV28jT2G/K8eu9OJ317yzXPTGe4Kw+lKDhFaS4dQ3Ltmb6xImKxfCQdqDqMXODhc9YLipLw==",
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.2.0.tgz",
"integrity": "sha512-js6wDY3SNLNZo5XwybhC8WKEw8BonEa9vqxN4IKbhEbo22i2+DinHxapV/PpFCTsmlkT1HMhF75xyOG9RVvI5g==",
"license": "MIT",
"dependencies": {
"@octokit/auth-oauth-app": "^8.1.2",
"@octokit/auth-oauth-user": "^5.1.2",
"@octokit/request": "^9.1.4",
"@octokit/request-error": "^6.1.6",
"@octokit/types": "^13.6.2",
"@octokit/auth-oauth-app": "^8.1.3",
"@octokit/auth-oauth-user": "^5.1.3",
"@octokit/request": "^9.2.1",
"@octokit/request-error": "^6.1.7",
"@octokit/types": "^13.8.0",
"toad-cache": "^3.7.0",
"universal-github-app-jwt": "^2.2.0",
"universal-user-agent": "^7.0.0"
@@ -689,14 +691,14 @@
}
},
"node_modules/@octokit/auth-oauth-app": {
"version": "8.1.2",
"resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-8.1.2.tgz",
"integrity": "sha512-3woNZgq5/S6RS+9ZTq+JdymxVr7E0s4EYxF20ugQvgX3pomdPUL5r/XdTY9wALoBM2eHVy4ettr5fKpatyTyHw==",
"version": "8.1.3",
"resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-8.1.3.tgz",
"integrity": "sha512-4e6OjVe5rZ8yBe8w7byBjpKtSXFuro7gqeGAAZc7QYltOF8wB93rJl2FE0a4U1Mt88xxPv/mS+25/0DuLk0Ewg==",
"license": "MIT",
"dependencies": {
"@octokit/auth-oauth-device": "^7.1.2",
"@octokit/auth-oauth-user": "^5.1.2",
"@octokit/request": "^9.1.4",
"@octokit/auth-oauth-device": "^7.1.3",
"@octokit/auth-oauth-user": "^5.1.3",
"@octokit/request": "^9.2.1",
"@octokit/types": "^13.6.2",
"universal-user-agent": "^7.0.0"
},
@@ -705,13 +707,13 @@
}
},
"node_modules/@octokit/auth-oauth-device": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-7.1.2.tgz",
"integrity": "sha512-gTOIzDeV36OhVfxCl69FmvJix7tJIiU6dlxuzLVAzle7fYfO8UDyddr9B+o4CFQVaMBLMGZ9ak2CWMYcGeZnPw==",
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-7.1.3.tgz",
"integrity": "sha512-BECO/N4B/Uikj0w3GCvjf/odMujtYTP3q82BJSjxC2J3rxTEiZIJ+z2xnRlDb0IE9dQSaTgRqUPVOieSbFcVzg==",
"license": "MIT",
"dependencies": {
"@octokit/oauth-methods": "^5.1.3",
"@octokit/request": "^9.1.4",
"@octokit/oauth-methods": "^5.1.4",
"@octokit/request": "^9.2.1",
"@octokit/types": "^13.6.2",
"universal-user-agent": "^7.0.0"
},
@@ -720,14 +722,14 @@
}
},
"node_modules/@octokit/auth-oauth-user": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-5.1.2.tgz",
"integrity": "sha512-PgVDDPJgZYb3qSEXK4moksA23tfn68zwSAsQKZ1uH6IV9IaNEYx35OXXI80STQaLYnmEE86AgU0tC1YkM4WjsA==",
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-5.1.3.tgz",
"integrity": "sha512-zNPByPn9K7TC+OOHKGxU+MxrE9SZAN11UHYEFLsK2NRn3akJN2LHRl85q+Eypr3tuB2GrKx3rfj2phJdkYCvzw==",
"license": "MIT",
"dependencies": {
"@octokit/auth-oauth-device": "^7.1.2",
"@octokit/oauth-methods": "^5.1.2",
"@octokit/request": "^9.1.4",
"@octokit/auth-oauth-device": "^7.1.3",
"@octokit/oauth-methods": "^5.1.3",
"@octokit/request": "^9.2.1",
"@octokit/types": "^13.6.2",
"universal-user-agent": "^7.0.0"
},
@@ -758,24 +760,35 @@
}
},
"node_modules/@octokit/oauth-methods": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-5.1.3.tgz",
"integrity": "sha512-M+bDBi5H8FnH0xhCTg0m9hvcnppdDnxUqbZyOkxlLblKpLAR+eT2nbDPvJDp0eLrvJWA1I8OX0KHf/sBMQARRA==",
"version": "5.1.4",
"resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-5.1.4.tgz",
"integrity": "sha512-Jc/ycnePClOvO1WL7tlC+TRxOFtyJBGuTDsL4dzXNiVZvzZdrPuNw7zHI3qJSUX2n6RLXE5L0SkFmYyNaVUFoQ==",
"license": "MIT",
"dependencies": {
"@octokit/oauth-authorization-url": "^7.0.0",
"@octokit/request": "^9.1.4",
"@octokit/request-error": "^6.1.6",
"@octokit/request": "^9.2.1",
"@octokit/request-error": "^6.1.7",
"@octokit/types": "^13.6.2"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/openapi": {
"version": "18.2.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi/-/openapi-18.2.0.tgz",
"integrity": "sha512-o9P7OtVWNtIV8Vze2fceohx1NdThnMZJc8kR44dmSXKcYH7GFHI/44PJgNsqIfiArbbSfjpLeXwvR9EKBjfgcw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=18"
}
},
"node_modules/@octokit/openapi-types": {
"version": "22.2.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz",
"integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg=="
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
"license": "MIT"
},
"node_modules/@octokit/request": {
"version": "9.2.2",
@@ -806,11 +819,12 @@
}
},
"node_modules/@octokit/types": {
"version": "13.6.2",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.2.tgz",
"integrity": "sha512-WpbZfZUcZU77DrSW4wbsSgTPfKcp286q3ItaIgvSbBpZJlu6mnYXAkjZz6LVZPXkEvLIM8McanyZejKTYUHipA==",
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^22.2.0"
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@pkgjs/parseargs": {
@@ -1608,9 +1622,9 @@
"dev": true
},
"node_modules/esbuild": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz",
"integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==",
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz",
"integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -1621,31 +1635,31 @@
"node": ">=18"
},
"optionalDependencies": {
"@esbuild/aix-ppc64": "0.25.0",
"@esbuild/android-arm": "0.25.0",
"@esbuild/android-arm64": "0.25.0",
"@esbuild/android-x64": "0.25.0",
"@esbuild/darwin-arm64": "0.25.0",
"@esbuild/darwin-x64": "0.25.0",
"@esbuild/freebsd-arm64": "0.25.0",
"@esbuild/freebsd-x64": "0.25.0",
"@esbuild/linux-arm": "0.25.0",
"@esbuild/linux-arm64": "0.25.0",
"@esbuild/linux-ia32": "0.25.0",
"@esbuild/linux-loong64": "0.25.0",
"@esbuild/linux-mips64el": "0.25.0",
"@esbuild/linux-ppc64": "0.25.0",
"@esbuild/linux-riscv64": "0.25.0",
"@esbuild/linux-s390x": "0.25.0",
"@esbuild/linux-x64": "0.25.0",
"@esbuild/netbsd-arm64": "0.25.0",
"@esbuild/netbsd-x64": "0.25.0",
"@esbuild/openbsd-arm64": "0.25.0",
"@esbuild/openbsd-x64": "0.25.0",
"@esbuild/sunos-x64": "0.25.0",
"@esbuild/win32-arm64": "0.25.0",
"@esbuild/win32-ia32": "0.25.0",
"@esbuild/win32-x64": "0.25.0"
"@esbuild/aix-ppc64": "0.25.2",
"@esbuild/android-arm": "0.25.2",
"@esbuild/android-arm64": "0.25.2",
"@esbuild/android-x64": "0.25.2",
"@esbuild/darwin-arm64": "0.25.2",
"@esbuild/darwin-x64": "0.25.2",
"@esbuild/freebsd-arm64": "0.25.2",
"@esbuild/freebsd-x64": "0.25.2",
"@esbuild/linux-arm": "0.25.2",
"@esbuild/linux-arm64": "0.25.2",
"@esbuild/linux-ia32": "0.25.2",
"@esbuild/linux-loong64": "0.25.2",
"@esbuild/linux-mips64el": "0.25.2",
"@esbuild/linux-ppc64": "0.25.2",
"@esbuild/linux-riscv64": "0.25.2",
"@esbuild/linux-s390x": "0.25.2",
"@esbuild/linux-x64": "0.25.2",
"@esbuild/netbsd-arm64": "0.25.2",
"@esbuild/netbsd-x64": "0.25.2",
"@esbuild/openbsd-arm64": "0.25.2",
"@esbuild/openbsd-x64": "0.25.2",
"@esbuild/sunos-x64": "0.25.2",
"@esbuild/win32-arm64": "0.25.2",
"@esbuild/win32-ia32": "0.25.2",
"@esbuild/win32-x64": "0.25.2"
}
},
"node_modules/escalade": {
@@ -3637,9 +3651,9 @@
}
},
"node_modules/undici": {
"version": "7.3.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-7.3.0.tgz",
"integrity": "sha512-Qy96NND4Dou5jKoSJ2gm8ax8AJM/Ey9o9mz7KN1bb9GP+G0l20Zw8afxTnY2f4b7hmhn/z8aC2kfArVQlAhFBw==",
"version": "7.7.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-7.7.0.tgz",
"integrity": "sha512-tZ6+5NBq4KH35rr46XJ2JPFKxfcBlYNaqLF/wyWIO9RMHqqU/gx/CLB1Y2qMcgB8lWw/bKHa7qzspqCN7mUHvA==",
"license": "MIT",
"engines": {
"node": ">=20.18.1"
@@ -3942,10 +3956,11 @@
"dev": true
},
"node_modules/yaml": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz",
"integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz",
"integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==",
"dev": true,
"license": "ISC",
"bin": {
"yaml": "bin.mjs"
},
+7 -5
View File
@@ -2,7 +2,7 @@
"name": "create-github-app-token",
"private": true,
"type": "module",
"version": "1.11.5",
"version": "2.0.2",
"description": "GitHub Action for creating a GitHub App Installation Access Token",
"scripts": {
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0 --packages=bundle",
@@ -13,20 +13,21 @@
"license": "MIT",
"dependencies": {
"@actions/core": "^1.11.1",
"@octokit/auth-app": "^7.1.4",
"@octokit/auth-app": "^7.2.0",
"@octokit/request": "^9.2.2",
"p-retry": "^6.2.1",
"undici": "^7.3.0"
"undici": "^7.7.0"
},
"devDependencies": {
"@octokit/openapi": "^18.2.0",
"@sinonjs/fake-timers": "^14.0.0",
"ava": "^6.2.0",
"c8": "^10.1.3",
"dotenv": "^16.4.7",
"esbuild": "^0.25.0",
"esbuild": "^0.25.2",
"execa": "^9.5.2",
"open-cli": "^8.0.0",
"yaml": "^2.7.0"
"yaml": "^2.7.1"
},
"release": {
"branches": [
@@ -44,6 +45,7 @@
{
"assets": [
"package.json",
"package-lock.json",
"dist/*"
],
"message": "build(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
+395
View File
@@ -0,0 +1,395 @@
{
"title": "App Permissions",
"type": "object",
"description": "The permissions granted to the user access token.",
"properties": {
"actions": {
"type": "string",
"description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.",
"enum": [
"read",
"write"
]
},
"administration": {
"type": "string",
"description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.",
"enum": [
"read",
"write"
]
},
"checks": {
"type": "string",
"description": "The level of permission to grant the access token for checks on code.",
"enum": [
"read",
"write"
]
},
"codespaces": {
"type": "string",
"description": "The level of permission to grant the access token to create, edit, delete, and list Codespaces.",
"enum": [
"read",
"write"
]
},
"contents": {
"type": "string",
"description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.",
"enum": [
"read",
"write"
]
},
"dependabot_secrets": {
"type": "string",
"description": "The level of permission to grant the access token to manage Dependabot secrets.",
"enum": [
"read",
"write"
]
},
"deployments": {
"type": "string",
"description": "The level of permission to grant the access token for deployments and deployment statuses.",
"enum": [
"read",
"write"
]
},
"environments": {
"type": "string",
"description": "The level of permission to grant the access token for managing repository environments.",
"enum": [
"read",
"write"
]
},
"issues": {
"type": "string",
"description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.",
"enum": [
"read",
"write"
]
},
"metadata": {
"type": "string",
"description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.",
"enum": [
"read",
"write"
]
},
"packages": {
"type": "string",
"description": "The level of permission to grant the access token for packages published to GitHub Packages.",
"enum": [
"read",
"write"
]
},
"pages": {
"type": "string",
"description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.",
"enum": [
"read",
"write"
]
},
"pull_requests": {
"type": "string",
"description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.",
"enum": [
"read",
"write"
]
},
"repository_custom_properties": {
"type": "string",
"description": "The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property.",
"enum": [
"read",
"write"
]
},
"repository_hooks": {
"type": "string",
"description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.",
"enum": [
"read",
"write"
]
},
"repository_projects": {
"type": "string",
"description": "The level of permission to grant the access token to manage repository projects, columns, and cards.",
"enum": [
"read",
"write",
"admin"
]
},
"secret_scanning_alerts": {
"type": "string",
"description": "The level of permission to grant the access token to view and manage secret scanning alerts.",
"enum": [
"read",
"write"
]
},
"secrets": {
"type": "string",
"description": "The level of permission to grant the access token to manage repository secrets.",
"enum": [
"read",
"write"
]
},
"security_events": {
"type": "string",
"description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.",
"enum": [
"read",
"write"
]
},
"single_file": {
"type": "string",
"description": "The level of permission to grant the access token to manage just a single file.",
"enum": [
"read",
"write"
]
},
"statuses": {
"type": "string",
"description": "The level of permission to grant the access token for commit statuses.",
"enum": [
"read",
"write"
]
},
"vulnerability_alerts": {
"type": "string",
"description": "The level of permission to grant the access token to manage Dependabot alerts.",
"enum": [
"read",
"write"
]
},
"workflows": {
"type": "string",
"description": "The level of permission to grant the access token to update GitHub Actions workflow files.",
"enum": [
"write"
]
},
"members": {
"type": "string",
"description": "The level of permission to grant the access token for organization teams and members.",
"enum": [
"read",
"write"
]
},
"organization_administration": {
"type": "string",
"description": "The level of permission to grant the access token to manage access to an organization.",
"enum": [
"read",
"write"
]
},
"organization_custom_roles": {
"type": "string",
"description": "The level of permission to grant the access token for custom repository roles management.",
"enum": [
"read",
"write"
]
},
"organization_custom_org_roles": {
"type": "string",
"description": "The level of permission to grant the access token for custom organization roles management.",
"enum": [
"read",
"write"
]
},
"organization_custom_properties": {
"type": "string",
"description": "The level of permission to grant the access token for custom property management.",
"enum": [
"read",
"write",
"admin"
]
},
"organization_copilot_seat_management": {
"type": "string",
"description": "The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change.",
"enum": [
"write"
]
},
"organization_announcement_banners": {
"type": "string",
"description": "The level of permission to grant the access token to view and manage announcement banners for an organization.",
"enum": [
"read",
"write"
]
},
"organization_events": {
"type": "string",
"description": "The level of permission to grant the access token to view events triggered by an activity in an organization.",
"enum": [
"read"
]
},
"organization_hooks": {
"type": "string",
"description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.",
"enum": [
"read",
"write"
]
},
"organization_personal_access_tokens": {
"type": "string",
"description": "The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization.",
"enum": [
"read",
"write"
]
},
"organization_personal_access_token_requests": {
"type": "string",
"description": "The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization.",
"enum": [
"read",
"write"
]
},
"organization_plan": {
"type": "string",
"description": "The level of permission to grant the access token for viewing an organization's plan.",
"enum": [
"read"
]
},
"organization_projects": {
"type": "string",
"description": "The level of permission to grant the access token to manage organization projects and projects public preview (where available).",
"enum": [
"read",
"write",
"admin"
]
},
"organization_packages": {
"type": "string",
"description": "The level of permission to grant the access token for organization packages published to GitHub Packages.",
"enum": [
"read",
"write"
]
},
"organization_secrets": {
"type": "string",
"description": "The level of permission to grant the access token to manage organization secrets.",
"enum": [
"read",
"write"
]
},
"organization_self_hosted_runners": {
"type": "string",
"description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.",
"enum": [
"read",
"write"
]
},
"organization_user_blocking": {
"type": "string",
"description": "The level of permission to grant the access token to view and manage users blocked by the organization.",
"enum": [
"read",
"write"
]
},
"team_discussions": {
"type": "string",
"description": "The level of permission to grant the access token to manage team discussions and related comments.",
"enum": [
"read",
"write"
]
},
"email_addresses": {
"type": "string",
"description": "The level of permission to grant the access token to manage the email addresses belonging to a user.",
"enum": [
"read",
"write"
]
},
"followers": {
"type": "string",
"description": "The level of permission to grant the access token to manage the followers belonging to a user.",
"enum": [
"read",
"write"
]
},
"git_ssh_keys": {
"type": "string",
"description": "The level of permission to grant the access token to manage git SSH keys.",
"enum": [
"read",
"write"
]
},
"gpg_keys": {
"type": "string",
"description": "The level of permission to grant the access token to view and manage GPG keys belonging to a user.",
"enum": [
"read",
"write"
]
},
"interaction_limits": {
"type": "string",
"description": "The level of permission to grant the access token to view and manage interaction limits on a repository.",
"enum": [
"read",
"write"
]
},
"profile": {
"type": "string",
"description": "The level of permission to grant the access token to manage the profile settings belonging to a user.",
"enum": [
"write"
]
},
"starring": {
"type": "string",
"description": "The level of permission to grant the access token to list and manage repositories a user is starring.",
"enum": [
"read",
"write"
]
}
},
"example": {
"contents": "read",
"issues": "read",
"deployments": "write",
"single_file": "read"
}
}
+42
View File
@@ -0,0 +1,42 @@
import { readFile, writeFile } from "node:fs/promises";
import OctokitOpenapi from "@octokit/openapi";
const appPermissionsSchema =
OctokitOpenapi.schemas["api.github.com"].components.schemas[
"app-permissions"
];
await writeFile(
`scripts/generated/app-permissions.json`,
JSON.stringify(appPermissionsSchema, null, 2) + "\n",
"utf8"
);
const permissionsInputs = Object.entries(appPermissionsSchema.properties)
.sort((a, b) => a[0].localeCompare(b[0]))
.reduce((result, [key, value]) => {
const formatter = new Intl.ListFormat("en", {
style: "long",
type: "disjunction",
});
const permissionAccessValues = formatter.format(
value.enum.map((p) => `'${p}'`)
);
const description = `${value.description} Can be set to ${permissionAccessValues}.`;
return `${result}
permission-${key.replace(/_/g, "-")}:
description: "${description}"`;
}, "");
const actionsYamlContent = await readFile("action.yml", "utf8");
// In the action.yml file, replace the content between the `<START GENERATED PERMISSIONS INPUTS>` and `<END GENERATED PERMISSIONS INPUTS>` comments with the new content
const updatedActionsYamlContent = actionsYamlContent.replace(
/(?<=# <START GENERATED PERMISSIONS INPUTS>)(.|\n)*(?=# <END GENERATED PERMISSIONS INPUTS>)/,
permissionsInputs + "\n "
);
await writeFile("action.yml", updatedActionsYamlContent, "utf8");
console.log("Updated action.yml with new permissions inputs");
+11
View File
@@ -17,3 +17,14 @@ or with npm
```
npm test
```
## How the tests work
The output from the tests is captured into a snapshot ([tests/snapshots/index.js.md](snapshots/index.js.md)). It includes all requests sent by our scripts to verify it's working correctly and to prevent regressions.
## How to add a new test
We have tests both for the `main.js` and `post.js` scripts.
- If you do not expect an error, take [main-token-permissions-set.test.js](tests/main-token-permissions-set.test.js) as a starting point.
- If your test has an expected error, take [main-missing-app-id.test.js](tests/main-missing-app-id.test.js) as a starting point.
-9
View File
@@ -1,9 +0,0 @@
process.env.GITHUB_REPOSITORY_OWNER = "actions";
process.env.GITHUB_REPOSITORY = "actions/create-github-app-token";
// Verify `main` exits with an error when neither the `app-id` nor `app_id` input is set.
try {
await import("../main.js");
} catch (error) {
console.error(error.message);
}
-10
View File
@@ -1,10 +0,0 @@
process.env.GITHUB_REPOSITORY_OWNER = "actions";
process.env.GITHUB_REPOSITORY = "actions/create-github-app-token";
process.env["INPUT_APP-ID"] = "123456";
// Verify `main` exits with an error when neither the `private-key` nor `private_key` input is set.
try {
await import("../main.js");
} catch (error) {
console.error(error.message);
}
+18 -14
View File
@@ -4,10 +4,10 @@ import { install } from "@sinonjs/fake-timers";
// Verify `main` retry when the clock has drifted.
await test((mockPool) => {
process.env.INPUT_OWNER = 'actions'
process.env.INPUT_REPOSITORIES = 'failed-repo';
const owner = process.env.INPUT_OWNER
const repo = process.env.INPUT_REPOSITORIES
process.env.INPUT_OWNER = "actions";
process.env.INPUT_REPOSITORIES = "failed-repo";
const owner = process.env.INPUT_OWNER;
const repo = process.env.INPUT_REPOSITORIES;
const mockInstallationId = "123456";
const mockAppSlug = "github-actions";
@@ -25,20 +25,23 @@ await test((mockPool) => {
})
.reply(({ headers }) => {
const [_, jwt] = (headers.authorization || "").split(" ");
const payload = JSON.parse(Buffer.from(jwt.split(".")[1], "base64").toString());
const payload = JSON.parse(
Buffer.from(jwt.split(".")[1], "base64").toString(),
);
if (payload.iat < 0) {
return {
statusCode: 401,
data: {
message: "'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued."
message:
"'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued.",
},
responseOptions: {
headers: {
"content-type": "application/json",
"date": new Date(Date.now() + 30000).toUTCString()
}
}
date: new Date(Date.now() + 30000).toUTCString(),
},
},
};
}
@@ -46,13 +49,14 @@ await test((mockPool) => {
statusCode: 200,
data: {
id: mockInstallationId,
"app_slug": mockAppSlug
app_slug: mockAppSlug,
},
responseOptions: {
headers: {
"content-type": "application/json"
}
}
"content-type": "application/json",
},
},
};
}).times(2);
})
.times(2);
});
@@ -10,7 +10,7 @@ await test((mockPool) => {
const mockAppSlug = "github-actions";
mockPool
.intercept({
path: `/users/${process.env.INPUT_OWNER}/installation`,
path: `/users/smockle/installation`,
method: "GET",
headers: {
accept: "application/vnd.github.v3+json",
@@ -21,7 +21,7 @@ await test((mockPool) => {
.reply(500, "GitHub API not available");
mockPool
.intercept({
path: `/users/${process.env.INPUT_OWNER}/installation`,
path: `/users/smockle/installation`,
method: "GET",
headers: {
accept: "application/vnd.github.v3+json",
@@ -32,6 +32,6 @@ await test((mockPool) => {
.reply(
200,
{ id: mockInstallationId, app_slug: mockAppSlug },
{ headers: { "content-type": "application/json" } }
{ headers: { "content-type": "application/json" } },
);
});
@@ -33,7 +33,7 @@ await test((mockPool) => {
})
.reply(
200,
{ id: mockInstallationId, "app_slug": mockAppSlug },
{ headers: { "content-type": "application/json" } }
{ id: mockInstallationId, app_slug: mockAppSlug },
{ headers: { "content-type": "application/json" } },
);
});
@@ -21,6 +21,6 @@ await test((mockPool) => {
.reply(
200,
{ id: mockInstallationId, app_slug: mockAppSlug },
{ headers: { "content-type": "application/json" } }
{ headers: { "content-type": "application/json" } },
);
});
@@ -20,7 +20,7 @@ await test((mockPool) => {
})
.reply(
200,
{ id: mockInstallationId, "app_slug": mockAppSlug },
{ headers: { "content-type": "application/json" } }
{ id: mockInstallationId, app_slug: mockAppSlug },
{ headers: { "content-type": "application/json" } },
);
});
+7
View File
@@ -0,0 +1,7 @@
import { test } from "./main.js";
// Verify `main` successfully sets permissions
await test(() => {
process.env.INPUT_PERMISSION_ISSUES = `write`;
process.env.INPUT_PERMISSION_PULL_REQUESTS = `read`;
});
+21 -5
View File
@@ -47,7 +47,7 @@ export async function test(cb = (_mockPool) => {}, env = DEFAULT_ENV) {
// Set up mocking
const baseUrl = new URL(env["INPUT_GITHUB-API-URL"]);
const basePath = baseUrl.pathname === "/" ? "" : baseUrl.pathname;
const mockAgent = new MockAgent();
const mockAgent = new MockAgent({ enableCallHistory: true });
mockAgent.disableNetConnect();
setGlobalDispatcher(mockAgent);
const mockPool = mockAgent.get(baseUrl.origin);
@@ -60,8 +60,9 @@ export async function test(cb = (_mockPool) => {}, env = DEFAULT_ENV) {
const owner = env.INPUT_OWNER ?? env.GITHUB_REPOSITORY_OWNER;
const currentRepoName = env.GITHUB_REPOSITORY.split("/")[1];
const repo = encodeURIComponent(
(env.INPUT_REPOSITORIES ?? currentRepoName).split(",")[0]
(env.INPUT_REPOSITORIES ?? currentRepoName).split(",")[0],
);
mockPool
.intercept({
path: `${basePath}/repos/${owner}/${repo}/installation`,
@@ -75,13 +76,14 @@ export async function test(cb = (_mockPool) => {}, env = DEFAULT_ENV) {
.reply(
200,
{ id: mockInstallationId, app_slug: mockAppSlug },
{ headers: { "content-type": "application/json" } }
{ headers: { "content-type": "application/json" } },
);
// Mock installation access token request
const mockInstallationAccessToken =
"ghs_16C7e42F292c6912E7710c838347Ae178B4a"; // This token is invalidated. Its from https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app.
const mockExpiresAt = "2016-07-11T22:14:10Z";
mockPool
.intercept({
path: `${basePath}/app/installations/${mockInstallationId}/access_tokens`,
@@ -95,12 +97,26 @@ export async function test(cb = (_mockPool) => {}, env = DEFAULT_ENV) {
.reply(
201,
{ token: mockInstallationAccessToken, expires_at: mockExpiresAt },
{ headers: { "content-type": "application/json" } }
{ headers: { "content-type": "application/json" } },
);
// Run the callback
cb(mockPool);
// Run the main script
await import("../main.js");
const { default: promise } = await import("../main.js");
await promise;
console.log("--- REQUESTS ---");
const calls = mockAgent
.getCallHistory()
.calls()
.map((call) => {
const route = `${call.method} ${call.path}`;
if (call.method === "GET") return route;
return `${route}\n${call.body}`;
});
console.log(calls.join("\n"));
}
+110 -45
View File
@@ -12,9 +12,7 @@ Generated by [AVA](https://avajs.dev).
> stdout
`app_id — 'app_id' is deprecated and will be removed in a future version. Use 'app-id' instead.␊
private_key — 'private_key' is deprecated and will be removed in a future version. Use 'private-key' instead.␊
skip_token_revoke — 'skip_token_revoke' is deprecated and will be removed in a future version. Use 'skip-token-revoke' instead.`
''
## main-custom-github-api-url.test.js
@@ -24,7 +22,9 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner and repositories set, creating token for repositories "create-github-app-token" owned by "actions"
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
- actions/create-github-app-token␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -33,17 +33,11 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## main-missing-app-id.test.js
> stderr
'Input required and not supplied: app-id'
> stdout
''
::save-state name=expiresAt::2016-07-11T22:14:10Z
--- REQUESTS ---␊
GET /api/v3/repos/actions/create-github-app-token/installation␊
POST /api/v3/app/installations/123456/access_tokens␊
{"repositories":["create-github-app-token"]}`
## main-missing-owner.test.js
@@ -55,16 +49,6 @@ Generated by [AVA](https://avajs.dev).
''
## main-missing-private-key.test.js
> stderr
'Input required and not supplied: private-key'
> stdout
''
## main-missing-repository.test.js
> stderr
@@ -83,7 +67,7 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner and repositories not set, creating token for the current repository ("create-github-app-token")␊
`Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -92,7 +76,11 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z
--- REQUESTS ---␊
GET /repos/actions/create-github-app-token/installation␊
POST /app/installations/123456/access_tokens␊
{"repositories":["create-github-app-token"]}`
## main-repo-skew.test.js
@@ -103,7 +91,9 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner and repositories set, creating token for repositories "failed-repo" owned by "actions"
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
- actions/failed-repo␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -112,7 +102,12 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z
--- REQUESTS ---␊
GET /repos/actions/failed-repo/installation␊
GET /repos/actions/failed-repo/installation␊
POST /app/installations/123456/access_tokens␊
{"repositories":["failed-repo"]}`
## main-token-get-owner-set-fail-response.test.js
@@ -122,7 +117,7 @@ Generated by [AVA](https://avajs.dev).
> stdout
`repositories not set, creating token for all repositories for given owner "smockle"
`Input 'repositories' is not set. Creating token for all repositories owned by smockle.
Failed to create token for "smockle" (attempt 1): GitHub API not available␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -132,7 +127,12 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z
--- REQUESTS ---␊
GET /users/smockle/installation␊
GET /users/smockle/installation␊
POST /app/installations/123456/access_tokens␊
null`
## main-token-get-owner-set-repo-fail-response.test.js
@@ -142,7 +142,9 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner and repositories set, creating token for repositories "failed-repo" owned by "actions"
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
- actions/failed-repo␊
Failed to create token for "failed-repo" (attempt 1): GitHub API not available␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -152,7 +154,12 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z
--- REQUESTS ---␊
GET /repos/actions/failed-repo/installation␊
GET /repos/actions/failed-repo/installation␊
POST /app/installations/123456/access_tokens␊
{"repositories":["failed-repo"]}`
## main-token-get-owner-set-repo-set-to-many-newline.test.js
@@ -162,7 +169,11 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner and repositories set, creating token for repositories "create-github-app-token,toolkit,checkout" owned by "actions"
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
- actions/create-github-app-token␊
- actions/toolkit␊
- actions/checkout␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -171,7 +182,11 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z
--- REQUESTS ---␊
GET /repos/actions/create-github-app-token/installation␊
POST /app/installations/123456/access_tokens␊
{"repositories":["create-github-app-token","toolkit","checkout"]}`
## main-token-get-owner-set-repo-set-to-many.test.js
@@ -181,7 +196,11 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner and repositories set, creating token for repositories "create-github-app-token,toolkit,checkout" owned by "actions"
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
- actions/create-github-app-token␊
- actions/toolkit␊
- actions/checkout␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -190,7 +209,11 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z
--- REQUESTS ---␊
GET /repos/actions/create-github-app-token/installation␊
POST /app/installations/123456/access_tokens␊
{"repositories":["create-github-app-token","toolkit","checkout"]}`
## main-token-get-owner-set-repo-set-to-one.test.js
@@ -200,7 +223,9 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner and repositories set, creating token for repositories "create-github-app-token" owned by "actions"
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
- actions/create-github-app-token␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -209,7 +234,11 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z
--- REQUESTS ---␊
GET /repos/actions/create-github-app-token/installation␊
POST /app/installations/123456/access_tokens␊
{"repositories":["create-github-app-token"]}`
## main-token-get-owner-set-repo-unset.test.js
@@ -219,7 +248,7 @@ Generated by [AVA](https://avajs.dev).
> stdout
`repositories not set, creating token for all repositories for given owner "actions"
`Input 'repositories' is not set. Creating token for all repositories owned by actions.
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -228,7 +257,11 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z
--- REQUESTS ---␊
GET /users/actions/installation␊
POST /app/installations/123456/access_tokens␊
null`
## main-token-get-owner-unset-repo-set.test.js
@@ -238,7 +271,8 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner not set, creating owner for given repositories "create-github-app-token" in current owner ("actions")
`No 'owner' input provided. Using default owner 'actions' to create token for the following repositories:
- actions/create-github-app-token␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -247,7 +281,11 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z
--- REQUESTS ---␊
GET /repos/actions/create-github-app-token/installation␊
POST /app/installations/123456/access_tokens␊
{"repositories":["create-github-app-token"]}`
## main-token-get-owner-unset-repo-unset.test.js
@@ -257,7 +295,7 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner and repositories not set, creating token for the current repository ("create-github-app-token")␊
`Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -266,7 +304,34 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z
--- REQUESTS ---␊
GET /repos/actions/create-github-app-token/installation␊
POST /app/installations/123456/access_tokens␊
{"repositories":["create-github-app-token"]}`
## main-token-permissions-set.test.js
> stderr
''
> stdout
`Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=installation-id::123456␊
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
--- REQUESTS ---␊
GET /repos/actions/create-github-app-token/installation␊
POST /app/installations/123456/access_tokens␊
{"repositories":["create-github-app-token"],"permissions":{"issues":"write","pull_requests":"read"}}`
## post-revoke-token-fail-response.test.js
Binary file not shown.