BM: Baca dalam Bahasa Melayu
World 5: Teamwork
Link PRs to issues
You will learn: how "Closes #12" makes an issue close by itself when a PR merges.
The problem
Mei’s events page was merged last week. But issue #9 is still open! Someone must close it by hand. Do it now.
- Labels
- enhancement
- Aaina
List our next events with dates.
- aina commented
The events page is live. Is this issue done?
Hint
Press “Close issue” under the comment box.Watch
A closing keyword: Words like Closes #9 in a pull request. When it merges into the default branch, issue 9 closes. goes in the PR description. When the PR merges into main, the issue closes by itself. Tap the magic line.
Tap the line that will close an issue.
0 of 1 found
Try it
Your gallery PR fixes issue #16. Edit the description, so merging closes #16.
- you
Adds a gallery page with 6 photos.
- Passed test
- This branch needs one approving review first.
Hint
Press “Edit description”. Add a new line: Closes #16. Then Save.Predict
Ravi’s PR says “Fixes #20”. It merges into a branch called test, not main. What happens to issue #20?
Pick one answer.
Check
Will this line close issue #9 on merge? Swipe right for yes, left for no.
Swipe right for good, left for needs work. Or use the buttons.
Fixes #9Try it
Time to merge your gallery PR. Then peek at the Issues tab.
- you
Adds a gallery page with 6 photos.
Closes #16
- Mei approved these changes
Love the photos!
- Passed test
You did it!
You can now link a PR to an issue, so it closes by itself.
Go deeper (optional)
All nine keywords: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved. For an issue in another repo, write Fixes owner/repo#100. For several issues, repeat the keyword: Closes #10, closes #11. A keyword in a commit message works too, once it reaches the default branch.
Bahasa Melayu
Halaman acara Mei dah di-merge (dicantum) minggu lepas. Tapi issue #9 masih terbuka! Seseorang kena tutup secara manual. Buat sekarang.
Kata kunci penutup (closing keyword) ditulis dalam penerangan PR. Bila PR di-merge ke main, issue itu tutup sendiri. Tekan baris ajaib itu.
PR galeri anda selesaikan issue #16. Ubah penerangan, supaya merge akan tutup #16.
PR Ravi tulis “Fixes #20”. Ia di-merge ke branch bernama test, bukan main. Apa jadi pada issue #20?
Adakah baris ini tutup issue #9 bila di-merge? Leret kanan untuk ya, kiri untuk tidak.
Masa untuk merge PR galeri anda. Kemudian intai tab Issues.
Kini anda boleh pautkan PR ke issue, supaya ia tutup dengan sendiri.
You finished this before. Practice is always welcome!
Official docs: Linking a pull request to an issue
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?