Skip to content

Commit 3ce7f60

Browse files
authored
update action yaml
1 parent e49c333 commit 3ce7f60

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Diff for: action.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ name: 'codespaces-board'
22
description: 'Action to aggregate GitHub Project Cards into a single issue'
33
author: 'Oleg Solomka @legomushroom'
44
inputs:
5-
token:
5+
readToken:
66
required: true
7-
description: 'GitHub token for API requests'
7+
description: 'GitHub token for read API requests'
8+
writeToken:
9+
required: true
10+
description: 'GitHub token for write API requests'
811
config:
912
required: true
1013
description: 'Path to the config'

Diff for: src/main.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { getConfigs, validateConfig } from './config';
1414
import { IConfig } from './interfaces/IConfig';
1515

1616
const TOKEN_READ_NAME = 'REPO_GITHUB_READ_PAT';
17-
const TOKEN_WRITE_NAME = 'REPO_GITHUB_READ_PAT';
17+
const TOKEN_WRITE_NAME = 'REPO_GITHUB_WRITE_PAT';
1818
const CONFIG_PATH = 'CONFIG_PATH';
1919

2020
// const overwriteBoardIssue = async (
@@ -189,7 +189,7 @@ async function run(): Promise<void> {
189189
try {
190190
const token = core.getInput('token');
191191
const readToken = env(TOKEN_READ_NAME) ?? core.getInput('readToken') ?? token;
192-
const writeToken = env(TOKEN_READ_NAME) ?? core.getInput('writeToken') ?? token;
192+
const writeToken = env(TOKEN_WRITE_NAME) ?? core.getInput('writeToken') ?? token;
193193

194194
if (!readToken) {
195195
throw new AuthorizationError('No read token found.');

0 commit comments

Comments
 (0)