796b88dc58
Resolves https://github.com/actions/create-github-app-token/issues/106 - Fixes the parsing to cope with whitespace in the input string. - Allows the input to be comma or newline-separated. (I've done this for all array-type inputs in my own actions, but I'm happy to remove this if you only want to support comma-separated.) - Added tests for parsing comma and newline-separated inputs.
10 lines
479 B
JavaScript
10 lines
479 B
JavaScript
import { test } from "./main.js";
|
|
|
|
// Verify `main` successfully obtains a token when the `owner` and `repositories` inputs are set (and the latter is a list of repos).
|
|
await test(() => {
|
|
process.env.INPUT_OWNER = process.env.GITHUB_REPOSITORY_OWNER;
|
|
const currentRepoName = process.env.GITHUB_REPOSITORY.split("/")[1];
|
|
// Intentional unnecessary whitespace to test parsing to array
|
|
process.env.INPUT_REPOSITORIES = `\n ${currentRepoName}\ntoolkit \n\n checkout \n`;
|
|
});
|