Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
macklinu committed Mar 14, 2019
1 parent 27725dd commit fc3dd0b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
11 changes: 3 additions & 8 deletions bin/create-action.js
Expand Up @@ -66,7 +66,8 @@ const getActionMetadata = async () => {
type: 'autocomplete',
name: 'icon',
message: 'Choose an icon for your action. Visit https://feathericons.com for a visual reference.',
choices: icons
choices: icons,
limit: 10
},
{
type: 'autocomplete',
Expand Down Expand Up @@ -128,13 +129,7 @@ const createAction = async (argv) => {
const directoryName = args._[0]
if (!directoryName || args.help) {
console.log(`\nUsage: npx actions-toolkit <name>`)
process.exit(1)
// Although this return is unreachable,
// for some reason, code after this block is reached in unit tests,
// even while this calls `process.exit(1)`.
// Adding a `return` below fixes that issue in the tests.
// eslint-disable-next-line
return
return process.exit(1)
}
const base = path.join(process.cwd(), directoryName)
try {
Expand Down
2 changes: 1 addition & 1 deletion bin/template/Dockerfile
Expand Up @@ -13,7 +13,7 @@ FROM node:slim
# Labels for GitHub to read your action
LABEL "com.github.actions.name"=":NAME"
LABEL "com.github.actions.description"=":DESCRIPTION"
# Here all of the available icons: https://feathericons.com/
# Here are all of the available icons: https://feathericons.com/
LABEL "com.github.actions.icon"=":ICON"
# And all of the available colors: https://developer.github.com/actions/creating-github-actions/creating-a-docker-container/#label
LABEL "com.github.actions.color"=":COLOR"
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshots__/create-action.test.js.snap
Expand Up @@ -16,7 +16,7 @@ FROM node:slim
# Labels for GitHub to read your action
LABEL "com.github.actions.name"="My Project Name"
LABEL "com.github.actions.description"="A cool project"
# Here all of the available icons: https://feathericons.com/
# Here are all of the available icons: https://feathericons.com/
LABEL "com.github.actions.icon"="anchor"
# And all of the available colors: https://developer.github.com/actions/creating-github-actions/creating-a-docker-container/#label
LABEL "com.github.actions.color"="blue"
Expand Down

0 comments on commit fc3dd0b

Please sign in to comment.