Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
def152b8a7 | ||
|
|
5d7307be63 | ||
|
|
525760a53f | ||
|
|
8ab05a8a84 | ||
|
|
d00315e88c | ||
|
|
fcc6c288e5 | ||
|
|
49bb2edce3 | ||
|
|
a8d6161485 | ||
|
|
5204204e81 | ||
|
|
0f859bf9e6 | ||
|
|
a1cbe0fa3c | ||
|
|
d7ee281215 | ||
|
|
93c1f04d6f | ||
|
|
dff4b11d10 | ||
|
|
6d44c9fd24 | ||
|
|
df432ceedc | ||
|
|
333678481b |
@@ -12,6 +12,6 @@ jobs:
|
|||||||
id-token: write
|
id-token: write
|
||||||
packages: write
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- name: Publish Immutable Action
|
- name: Publish Immutable Action
|
||||||
uses: actions/publish-immutable-action@v0.0.4
|
uses: actions/publish-immutable-action@v0.0.4
|
||||||
|
|||||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -3,7 +3,9 @@ name: release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- "*.x"
|
||||||
- main
|
- main
|
||||||
|
- beta
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -16,7 +18,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# build local version to create token
|
# build local version to create token
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|||||||
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
@@ -11,12 +11,15 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
integration:
|
integration:
|
||||||
name: Integration
|
name: Integration
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
@@ -32,7 +35,7 @@ jobs:
|
|||||||
# do not run from forks, as forks don’t have access to repository secrets
|
# do not run from forks, as forks don’t have access to repository secrets
|
||||||
if: github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
|
if: github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ jobs:
|
|||||||
update-permission-inputs:
|
update-permission-inputs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
@@ -28,6 +28,6 @@ jobs:
|
|||||||
- name: Run permission inputs update script
|
- name: Run permission inputs update script
|
||||||
run: node scripts/update-permission-inputs.js
|
run: node scripts/update-permission-inputs.js
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0
|
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
|
||||||
with:
|
with:
|
||||||
commit_message: 'feat: update permission inputs'
|
commit_message: 'feat: update permission inputs'
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ GitHub Action for creating a GitHub App installation access token.
|
|||||||
|
|
||||||
In order to use this action, you need to:
|
In order to use this action, you need to:
|
||||||
|
|
||||||
1. [Register new GitHub App](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app)
|
1. [Register new GitHub App](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app).
|
||||||
2. [Store the App's ID in your repository environment variables](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) (example: `APP_ID`)
|
2. [Store the App's ID or Client ID in your repository environment variables](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) (example: `APP_ID`).
|
||||||
3. [Store the App's private key in your repository secrets](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example: `PRIVATE_KEY`)
|
3. [Store the App's private key in your repository secrets](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example: `PRIVATE_KEY`).
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> An installation access token expires after 1 hour. Please [see this comment](https://github.com/actions/create-github-app-token/issues/121#issuecomment-2043214796) for alternative approaches if you have long-running processes.
|
> An installation access token expires after 1 hour. Please [see this comment](https://github.com/actions/create-github-app-token/issues/121#issuecomment-2043214796) for alternative approaches if you have long-running processes.
|
||||||
|
|||||||
4951
dist/main.cjs
vendored
4951
dist/main.cjs
vendored
File diff suppressed because it is too large
Load Diff
4
dist/post.cjs
vendored
4
dist/post.cjs
vendored
@@ -40674,7 +40674,7 @@ var endpoint = withDefaults(null, DEFAULTS);
|
|||||||
// node_modules/@octokit/request/dist-bundle/index.js
|
// node_modules/@octokit/request/dist-bundle/index.js
|
||||||
var import_fast_content_type_parse = __toESM(require_fast_content_type_parse(), 1);
|
var import_fast_content_type_parse = __toESM(require_fast_content_type_parse(), 1);
|
||||||
|
|
||||||
// node_modules/@octokit/request-error/dist-src/index.js
|
// node_modules/@octokit/request/node_modules/@octokit/request-error/dist-src/index.js
|
||||||
var RequestError = class extends Error {
|
var RequestError = class extends Error {
|
||||||
name;
|
name;
|
||||||
/**
|
/**
|
||||||
@@ -40714,7 +40714,7 @@ var RequestError = class extends Error {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// node_modules/@octokit/request/dist-bundle/index.js
|
// node_modules/@octokit/request/dist-bundle/index.js
|
||||||
var VERSION2 = "0.0.0-development";
|
var VERSION2 = "10.0.3";
|
||||||
var defaults_default = {
|
var defaults_default = {
|
||||||
headers: {
|
headers: {
|
||||||
"user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}`
|
"user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}`
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ export function getPermissionsFromInputs(env) {
|
|||||||
if (!key.startsWith("INPUT_PERMISSION-")) return permissions;
|
if (!key.startsWith("INPUT_PERMISSION-")) return permissions;
|
||||||
if (!value) return permissions;
|
if (!value) return permissions;
|
||||||
|
|
||||||
const permission = key.slice("INPUT_PERMISSION-".length).toLowerCase();
|
const permission = key.slice("INPUT_PERMISSION-".length).toLowerCase()
|
||||||
|
.replaceAll(/-/g, "_");
|
||||||
|
|
||||||
// Inherit app permissions if no permissions inputs are set
|
// Inherit app permissions if no permissions inputs are set
|
||||||
if (permissions === undefined) {
|
if (permissions === undefined) {
|
||||||
|
|||||||
644
package-lock.json
generated
644
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@@ -2,7 +2,7 @@
|
|||||||
"name": "create-github-app-token",
|
"name": "create-github-app-token",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "2.0.5",
|
"version": "2.1.2",
|
||||||
"description": "GitHub Action for creating a GitHub App Installation Access Token",
|
"description": "GitHub Action for creating a GitHub App Installation Access Token",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0 --packages=bundle",
|
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0 --packages=bundle",
|
||||||
@@ -14,25 +14,29 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
"@octokit/auth-app": "^7.2.1",
|
"@octokit/auth-app": "^7.2.1",
|
||||||
"@octokit/request": "^9.2.2",
|
"@octokit/request": "^10.0.3",
|
||||||
"p-retry": "^6.2.1",
|
"p-retry": "^6.2.1",
|
||||||
"undici": "^7.8.0"
|
"undici": "^7.8.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@octokit/openapi": "^19.0.0",
|
"@octokit/openapi": "^19.1.0",
|
||||||
"@sinonjs/fake-timers": "^14.0.0",
|
"@sinonjs/fake-timers": "^14.0.0",
|
||||||
"ava": "^6.3.0",
|
"ava": "^6.4.1",
|
||||||
"c8": "^10.1.3",
|
"c8": "^10.1.3",
|
||||||
"dotenv": "^16.5.0",
|
"dotenv": "^17.2.1",
|
||||||
"esbuild": "^0.25.3",
|
"esbuild": "^0.25.8",
|
||||||
"execa": "^9.5.2",
|
"execa": "^9.6.0",
|
||||||
"open-cli": "^8.0.0",
|
"open-cli": "^8.0.0",
|
||||||
"yaml": "^2.7.1"
|
"yaml": "^2.8.1"
|
||||||
},
|
},
|
||||||
"release": {
|
"release": {
|
||||||
"branches": [
|
"branches": [
|
||||||
"+([0-9]).x",
|
"+([0-9]).x",
|
||||||
"main"
|
"main",
|
||||||
|
{
|
||||||
|
"name": "beta",
|
||||||
|
"prerelease": true
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"@semantic-release/commit-analyzer",
|
"@semantic-release/commit-analyzer",
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ Generated by [AVA](https://avajs.dev).
|
|||||||
--- REQUESTS ---␊
|
--- REQUESTS ---␊
|
||||||
GET /repos/actions/create-github-app-token/installation␊
|
GET /repos/actions/create-github-app-token/installation␊
|
||||||
POST /app/installations/123456/access_tokens␊
|
POST /app/installations/123456/access_tokens␊
|
||||||
{"repositories":["create-github-app-token"],"permissions":{"issues":"write","pull-requests":"read"}}`
|
{"repositories":["create-github-app-token"],"permissions":{"issues":"write","pull_requests":"read"}}`
|
||||||
|
|
||||||
## post-revoke-token-fail-response.test.js
|
## post-revoke-token-fail-response.test.js
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user