Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| df432ceedc | |||
| 333678481b |
Vendored
+1
-1
@@ -42400,7 +42400,7 @@ function getPermissionsFromInputs(env) {
|
||||
return Object.entries(env).reduce((permissions2, [key, value]) => {
|
||||
if (!key.startsWith("INPUT_PERMISSION-")) 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) {
|
||||
return { [permission]: value };
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@ export function getPermissionsFromInputs(env) {
|
||||
if (!key.startsWith("INPUT_PERMISSION-")) 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
|
||||
if (permissions === undefined) {
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "create-github-app-token",
|
||||
"version": "2.0.5",
|
||||
"version": "2.0.6",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "create-github-app-token",
|
||||
"version": "2.0.5",
|
||||
"version": "2.0.6",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.11.1",
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "create-github-app-token",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"version": "2.0.5",
|
||||
"version": "2.0.6",
|
||||
"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",
|
||||
|
||||
@@ -331,7 +331,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
--- 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"}}`
|
||||
{"repositories":["create-github-app-token"],"permissions":{"issues":"write","pull_requests":"read"}}`
|
||||
|
||||
## post-revoke-token-fail-response.test.js
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user