iTranslated by AI
Speedrun Guide: Get 4 GitHub Achievements in 5 Minutes with One-Liners
Introduction
Are you collecting the "Achievements" badges displayed on your GitHub profile?

Actually, you can earn 4 badges in just 5 minutes. In this article, I will introduce how to efficiently earn these badges using one-liners with the GitHub CLI.
Targeted Badges
| Badge | Condition |
|---|---|
| ⚡ Quickdraw | Close an Issue/PR within 5 minutes |
| 🦈 Pull Shark | Merge 2 pull requests |
| 🤠 YOLO | Merge your own PR without a review |
| 👥 Pair Extraordinaire | Merge a PR with a Co-author |
Prerequisites
Please install and authenticate with the GitHub CLI.
# Install (Mac)
brew install gh
# Authenticate
gh auth login
Get Them All at Once (For Those in a Hurry)
I have prepared a script that earns all 4 badges in one go.
curl -fsSL https://raw.githubusercontent.com/TakatoPhy/github-achievements-speedrun/main/scripts/speedrun.sh | bash
Running this will automatically handle repository creation, badge acquisition, and cleanup.
Below is the explanation for those who want to earn them individually.
1. Quickdraw ⚡
Condition: Open an Issue or PR and close it within 5 minutes.
gh repo create test-quickdraw --public && \
gh issue create -R $(gh api user -q .login)/test-quickdraw -t "test" -b "test" | \
xargs -I {} gh issue close {} -R $(gh api user -q .login)/test-quickdraw && \
gh repo delete $(gh api user -q .login)/test-quickdraw --yes
That is all. It automatically handles everything from creating the repository and issue to closing them immediately and deleting the repository.
2. Pull Shark 🦈
Condition: Merge 2 pull requests.
REPO="test-pullshark-$(date +%s)"
gh repo create $REPO --public && cd /tmp && \
git clone "https://github.com/$(gh api user -q .login)/$REPO" && cd $REPO && \
echo "# PR 1" > file1.txt && git add . && git commit -m "add file1" && git push && \
git checkout -b pr1 && echo "change1" >> file1.txt && git add . && \
git commit -m "change1" && git push -u origin pr1 && \
gh pr create -t "PR1" -b "test" && gh pr merge --merge && \
git checkout main && git pull && \
git checkout -b pr2 && echo "change2" >> file1.txt && git add . && \
git commit -m "change2" && git push -u origin pr2 && \
gh pr create -t "PR2" -b "test" && gh pr merge --merge && \
cd ~ && gh repo delete $(gh api user -q .login)/$REPO --yes
Create and merge two PRs. This unlocks the Pull Shark badge.
3. YOLO 🤠
Condition: Merge your own PR without a code review.
REPO="test-yolo-$(date +%s)"
gh repo create $REPO --public && cd /tmp && \
git clone "https://github.com/$(gh api user -q .login)/$REPO" && cd $REPO && \
echo "# YOLO" > file.txt && git add . && git commit -m "init" && git push && \
git checkout -b yolo && echo "yolo" >> file.txt && git add . && \
git commit -m "yolo" && git push -u origin yolo && \
gh pr create -t "YOLO" -b "no review needed" && gh pr merge --merge && \
cd ~ && gh repo delete $(gh api user -q .login)/$REPO --yes
Merge without a review. As the name suggests, it is a "You Only Live Once" mindset.
4. Pair Extraordinaire 👥
Condition: Merge a PR that includes a commit with a Co-author.
REPO="test-pair-$(date +%s)"
gh repo create $REPO --public && cd /tmp && \
git clone "https://github.com/$(gh api user -q .login)/$REPO" && cd $REPO && \
echo "# Pair" > file.txt && git add . && git commit -m "init" && git push && \
git checkout -b feature && echo "collab" >> file.txt && git add . && \
git commit -m "feat: add feature
Co-Authored-By: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" && \
git push -u origin feature && \
gh pr create -t "Pair PR" -b "test" && gh pr merge --merge && \
cd ~ && gh repo delete $(gh api user -q .login)/$REPO --yes
The key is to include Co-Authored-By: in the commit message.
Other Badges
| Badge | How to get | Difficulty |
|---|---|---|
| ⭐ Starstruck | 16 stars on a repository | ⭐⭐⭐ |
| 🧠 Galaxy Brain | 2 Best Answers in Discussions | ⭐⭐ |
| 💝 Public Sponsor | Sponsor someone (from $1) | ⭐ |
Repository
All scripts are available on GitHub.
⭐ Giving it a star would be a great encouragement!
Summary
- You can earn 4 badges in 5 minutes with the GitHub CLI.
- One-shot acquisition is possible with automation scripts.
- Enrich your profile and enjoy your GitHub life.
Happy Hacking! 🎉
Discussion
壊れてますね