mirror of
https://github.com/actions/create-github-app-token.git
synced 2026-12-05 15:22:56 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df432ceedc | ||
|
|
333678481b |
No files matched your search
Vendored
+1
-1
@@ -42400,7 +42400,7 @@ function getPermissionsFromInputs(env) {
|
|||||||
return Object.entries(env).reduce((permissions2, [key, value]) => {
|
return Object.entries(env).reduce((permissions2, [key, value]) => {
|
||||||
if (!key.startsWith("INPUT_PERMISSION-")) return permissions2;
|
if (!key.startsWith("INPUT_PERMISSION-")) return permissions2;
|
||||||
if (!value) return permissions2;
|
if (!value) return permissions2;
|
||||||
const permission = key.slice("INPUT_PERMISSION-".length).toLowerCase();
|
const permission = key.slice("INPUT_PERMISSION-".length).toLowerCase().replaceAll(/-/g, "_");
|
||||||
if (permissions2 === void 0) {
|
if (permissions2 === void 0) {
|
||||||
return { [permission]: value };
|
return { [permission]: value };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "create-github-app-token",
|
"name": "create-github-app-token",
|
||||||
"version": "2.0.5",
|
"version": "2.0.6",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "create-github-app-token",
|
"name": "create-github-app-token",
|
||||||
"version": "2.0.5",
|
"version": "2.0.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
|
|||||||
+1
-1
@@ -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.0.6",
|
||||||
"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",
|
||||||
|
|||||||
@@ -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