Day 4, 30 minutes · beginner
Why it matters
In the terminal, Copilot works while you watch. On GitHub, it can work while you do something else. You assign an issue to Copilot the way you would assign it to a colleague. Copilot starts a session in its own environment in the cloud, writes the code on a new branch, checks its work, opens a pull request and asks you to review it. GitHub calls this the Copilot cloud agent; its newer experience on GitHub.com is called Copilot in the cloud.
The quality of the result depends mostly on the issue. GitHub's own advice is to treat the issue as a prompt: say what the problem is, what a good result looks like and which files are involved. A vague issue gives a vague pull request, and you pay for both in time and credits.
Today you put the shop site on GitHub, write one well-scoped issue, hand it to Copilot and steer the session once while it works. Tomorrow you review what it made.
What you need
- A plan that includes the cloud agent. Copilot in the cloud is in Copilot Student, Pro, Pro+, Max, Business and Enterprise. It is not in Copilot Free.
- At work: the cloud is switched on by default for organizations, but an organization owner can switch it off, and a repository admin can block it for one repository. If Copilot is not in the assignee list, ask your admin.
- A repository on GitHub that you can write to. A cloud session always works inside one repository on GitHub.
What makes a good issue
GitHub lists three things an ideal task for Copilot has:
- A clear description of the problem or the work.
- Complete acceptance criteria: what a good solution looks like. Write them as "Done when" lines you can check.
- Directions about which files need to change.
Good first tasks are small and well defined: a bug, a page, a test, a piece of documentation. GitHub advises doing these yourself instead: work that is vague, broad, security-sensitive or urgent in production, and work you want to learn from yourself.
The cheese board issue in the guide follows that pattern. It names the new file, the data source (cheeses.json), the price rule and three checks. You can check the result in two minutes, because you know the prices: Starter 7.10, Smoky 6.80, Full house 14.10.
The steps
- Put the project on GitHub as a private repository. The cloud agent copies it from there, together with
.github/copilot-instructions.mdfrom lesson 2. - Write the issue with the problem, what to build and when it is done.
- Assign it to Copilot. The dialog has an optional prompt for extra guidance. Copilot also follows the repository's custom instructions.
- Watch the session log. It shows what Copilot reads, which commands it runs and what it changes.
- Steer once. If you see Copilot heading the wrong way, or want something extra, type a follow-up in the session. You do not have to stop it and start over.
- Wait for the review request. Copilot opens a pull request and asks you to review it.
Follow the guide for GitHub Copilot below for the exact clicks.
Things to know about a cloud session
- Copilot only sees the issue as it was when you assigned it. A comment you add to the issue later is not read. Put new information in a comment on Copilot's pull request instead.
- One branch, one pull request per task. For a second change, write a second issue.
- Your branch rules apply to Copilot too. A ruleset or branch protection rule can stop Copilot from creating or updating its pull request.
- Credits. The session and every steering message use AI credits. Cloud sessions also use compute, which comes from a separate monthly allowance.
No cloud agent on your plan?
On Copilot Free you can still do this lesson's task. Make a branch with git switch -c cheese-boards, start copilot and paste the issue text as the task. Then commit, push the branch with git push -u origin cheese-boards and open a pull request on GitHub yourself. You review that pull request in lesson 5.
Example: Roos's issue
Roos assigned the issue at lunch. The session log showed Copilot reading cheeses.json and the instructions file, then writing boards.html. She sent one steering message asking for a table with three columns. Twenty minutes later she had a notification: Copilot had opened a pull request and asked for her review.
Common mistakes
- An issue without "done when". Copilot decides for itself when it is finished.
- Adding requirements as issue comments. Copilot does not see them after you assign the issue.
- Merging straight away. A pull request from Copilot needs the same review as one from a person. That is lesson 5.
Today's actions
Ticks are not saved without an accountDo it in GitHub Copilot
GitHub Copilot
- Create an empty private repository called brindlewick-cheese on GitHub. Then push your local repository to it, replacing YOUR-NAME with your GitHub user name.
git branch -M main git remote add origin https://github.com/YOUR-NAME/brindlewick-cheese.git git push -u origin main - On the repository page, click Issues and create a new issue. Paste the title on the first line below into the title field and the rest into the description.
Add a cheese board page ## Problem Customers ask which of our cheeses go well together. We want a page with three ready-made cheese boards. ## What to build - A new page boards.html with three boards: Starter (Old Brindle, Hazel Blue), Smoky (Smoked Fennel, Old Brindle) and Full house (all four cheeses). - The price of a board is the sum of 100 g of each cheese in it, taken from cheeses.json, shown in euros with two decimals. - Same look as index.html. Link index.html and boards.html to each other. ## Done when - Every board price matches cheeses.json. - No price in cheeses.json changed. - The pull request lists every file that changed. - Open the issue. In the right side menu, click Assignees, then click Copilot in the list.
- In the Optional prompt field of the dialog that opens, paste this line. Leave the repository and branch as they are, and confirm the assignment.
Follow .github/copilot-instructions.md. Do not change index.html beyond adding the link to boards.html. - Go to github.com/copilot and open the new session. Read the session log: it shows what Copilot reads, plans, changes and checks.
- Send one steering message in the prompt box below the session log and press Enter. Copilot picks it up after its current tool call.
Put the three boards in a simple table with the columns Board, Cheeses and Price. - Wait until Copilot has opened its pull request and requested your review. Do not merge yet: you review it in lesson 5.
Note: Assigning an issue to Copilot is marked public preview. Copilot gets the issue title, description and comments at the moment you assign it, and does not see later issue comments: put new information in a comment on its pull request. Each steering message uses AI credits. Without access to the cloud agent, see the lesson text.
Paid planCopilot in the cloud is in Copilot Student, Pro, Pro+, Max, Business and Enterprise, not in Copilot Free. Organization or repository admins can switch it off.
Create a free account to save your progress
Free, and no payment details. Your ticks and finished lessons are kept, on every device.
Create a free account I already have an accountCreate a free account to save your progress. Sign in or sign up