node-core-utils
node-core-utils copied to clipboard
Automatically copy relevant text into user's clipboard
When running commands, eg:
$ git node land --continue
Running `final`..
✔ 06e09b61712d4963699d90389b43bddcf41c02f0
✔ 0:0 skipping fixes-url fixes-url
✔ 0:0 blank line after title line-after-title
✔ 0:0 line-lengths are valid line-length
✔ 0:0 metadata is at end of message metadata-end
✔ 0:0 reviewers are valid reviewers
✔ 0:0 valid subsystems subsystem
✔ 0:0 Title is <= 50 columns. title-length
--------------------------------------------------------------------------------
The following commits are ready to be pushed to DANGER/master
- 06e09b6171 test: refactor http-https-default-ports
--------------------------------------------------------------------------------
To finish landing:
1. Run `git push DANGER master`
2. Post in the PR: `Landed in 06e09b6`
--------------------------------------------------------------------------------
? Clean up generated temporary files? [Y/n] Y
it should be possible to copy the Landed in ... to the clipboard, so the user can just change to browser and directly paste it in.
Not sure if possible on Windows, but on mac it's pbcopy, and on Linux it's normally xclip -selection clipboard.
On Windows, you can pipe the output to clip
I use something in my own modified bash script and it is indeed nice that way :-)
COMMITS=$(git rev-list --count master...upstream/master)
# Copy the message for the PR to the clipboard
if [ $COMMITS != "1" ] && [ $COMMITS != "2" ]
then
echo "Landed in $(git rev-parse upstream/master)...$(git rev-parse HEAD) :tada:" | xclip -sel clip
else
COMMIT_IDS=$(git log --format="%H" -n $COMMITS --reverse)
echo "Landed in ${COMMIT_IDS//$'\n'/, } :tada:" | xclip -sel clip
fi
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.