Skip to content

Commit 4dbc412

Browse files
committed
fixup! fixup! tools: add a script to help with nomination
add confirm prompt before opening the discussion
1 parent cbb129c commit 4dbc412

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tools/actions/nominate.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ EOF
4141
return 1
4242
}
4343

44+
read -p 'Open the discussion using `gh`? (y/N)' -n 1 -r
45+
echo
46+
if ! ([ "$REPLY" = "y" ] || [ "$REPLY" = "Y" ]); then
47+
set +x
48+
echo "Here's the body that you set:" >&2
49+
echo "$BODY"
50+
echo "Open https://github.com/nodejs/collaborators/discussions/new/choose in your browser to create the discussion manually" >&2
51+
return 0
52+
fi
53+
4454
echo "Getting repo ID and discussion category" >&2
4555
# shellcheck disable=SC2016
4656
REPO_ID_AND_DISCUSSION_CATEGORY_ID="$(gh api graphql -f query='

0 commit comments

Comments
 (0)