BM: Baca dalam Bahasa Melayu
World 9: Power Tools
GitHub Copilot
You will learn: the ways Copilot can help, and why you stay in charge.
The problem
You type function wordCount(. Grey text appears and finishes the whole function. Magic! But who is responsible for that code?
Pick one answer.
Watch
Tap each point on the timeline.
GitHub Copilot: GitHub's AI helper. It suggests code, answers questions and can work on small tasks. is GitHub’s AI helper. It turns up in five places. Tap each one.
Try it
Which Copilot helper fits each job?
Drag a card into a box. Or tap the card, then tap the box.
Try it
The coding agent: An AI helper that works on a task by itself, then opens a pull request for you to review. turns an issue into a pull request. Put the steps in order.
First step at the top. Put these in order. Use the arrows, or drag.
- You review, test and decide
- It opens a pull request
- You assign the issue to Copilot
- It works on a branch in the cloud
- You write a clear issue
Hint
It can’t start before it has an issue to work on.Try it
The agent opened pull request #8. It adds a word counter, but no test. Ask for a test in a comment.
- Ccoding-agent
Adds a wordCount function and shows it under each entry.
Fixes #7
- Passed build
Hint
Write a comment with the word “test” in it. Then press Comment.Predict
The agent’s pull request passes every check. What should happen next?
Pick one answer.
Check
Safe to paste into an AI chat? Swipe each one.
Swipe right for good, left for needs work. Or use the buttons.
An error message from your tests
You did it!
You can now use Copilot as a helper, and stay in charge.
Go deeper (optional)
Copilot changes fast. Check docs.github.com for what you can use today. Your school or company may switch some parts off. Copilot can also review a pull request when asked. By default, its review does not count as an approval. Look at wordCount("") in that pull request. It returns 1, not 0. A test would catch that!
Bahasa Melayu
Anda taip function wordCount(. Teks kelabu muncul dan siapkan seluruh fungsi. Ajaib! Tapi siapa yang bertanggungjawab atas kod itu?
GitHub Copilot ialah pembantu AI GitHub. Ia muncul di lima tempat. Ketik setiap satu.
Pembantu Copilot mana yang sesuai untuk setiap kerja?
Coding agent (ejen pengekodan) tukar issue jadi pull request. Susun langkahnya ikut urutan.
Ejen itu buka pull request #8. Ia tambah pengira perkataan, tapi tiada ujian. Minta satu ujian dalam komen.
Pull request ejen itu lulus semua semakan. Apa patut berlaku seterusnya?
Selamat ditampal ke dalam chat AI? Leret setiap satu.
Kini anda boleh guna Copilot sebagai pembantu, dan tetap kawal kod anda.
You finished this before. Practice is always welcome!
Official docs: What is GitHub Copilot? · About Copilot coding agent · About Copilot code review
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?