1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-31 21:11:44 +02:00

Add content for vmstat

This commit is contained in:
Kamran Ahmed
2022-10-11 19:45:21 +04:00
parent 22fd69a5e8
commit 5f2a9496f7
4 changed files with 21 additions and 13 deletions

View File

@@ -15,16 +15,10 @@ require jq
require gh
require fzf
# get the list of open pull requests
prs=$(gh pr list --json number,title --limit 100 | jq -r '.[] | "\(.number) \(.title)"')
prd="$(gh pr list --json 'number,title' | jq -r '.[]| [.number, .title] | @sh' | column -t -s"'" | fzf)"
[ -z "$prd" ] && echo "No PR selected" && exit 0
# select a pr
pr=$(echo "$prs" | fzf --prompt="Select a PR: " --height=50% --reverse --preview="gh pr view {1} --json 'files' | jq -r '.files|map(.path)|.[]'")
pr_id="$(echo "$prd" | awk '{print $1}')"
# get the pr number
pr_number=$(echo "$pr" | awk '{print $1}')
[ -z "$pr_number" ] && echo "🛑 No PR selected" && exit 1
echo "Checkout PR: $pr_number"
gh pr checkout "$pr_number"
gh pr view "$pr_id" --json "files" | jq -r '.files|map(.path)|.[]'
gh pr checkout "$pr_id"

9
scripts/squash-merge.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/sh
set -e
git reset --soft HEAD~$(git rev-list --count HEAD ^master)
git checkout master
git add -A
git commit -m "$1"