Automate recurring developer tasks with the GitHub Copilot app | Tutorial for beginners
93 segments
If a PR is never merged, that code
never finds its way to the codebase.
And if that PR contains security updates, well,
now we’ve got tech debt.
Managing library updates can be tedious at times.
The exact type of tedium
an automated task can handle.
Let’s see how we can use automations
in the Copilot app, to offload that tedium.
An automation is a task you set up once,
so Copilot can run it again and again.
You describe the task one time
and it keeps working without you.
So instead of opening, reading,
and triaging these types of PRs manually,
every single day, let’s describe that to chore one
time and let Copilot take it off our plate.
Creating an automation starts with two things:
a name and a trigger.
For my name, I’m going to call this
“Daily Dependabot triage”.
And then for the trigger, I can have this as ‘Manual’,
which is great if I want to kick this off myself,
maybe while I’m testing an idea.
‘Hourly’, ‘Daily’, and ‘Weekly’,
to run this on a regular schedule,
and then ‘Issue created’, which will automatically run
when an issue is created,
rather than watching the clock.
You’ll notice that I’m going to leave
this set to be 9 a.m.,
just before I typically start work.
I can choose to run this in the cloud if I want,
or let it run on my local system.
And then I’ve got my prompt,
where I can describe in natural language,
just like I was creating a session,
what it is that I want this automation to do:
“Review the open Dependabot PRs.
Group them by risk,
call out the ones that are safe to merge
and are minor bumps
as opposed to the bigger version updates.
Ensure each one’s CI
is passing, and give me a short summary
of the best next steps.”
I’m going to select the project here,
to point this at my Tailspin Toys,
which is where I have all of those Dependabot PRs,
that I’m currently managing.
And then down below I can hit ‘Create’.
Now, I don’t want to wait until 9 a.m.
for this to actually run,
so I’ll choose, ‘Create and run’,
which will kick off this job right now,
so that way I can see it in action.
Copilot will go off,
read through all of those open Dependabot PRs
and come back with exactly what I asked for:
the safe patch and minor bumps grouped together,
and the riskier versions flagged
for a closer look later on.
A chore that used to scatter my whole morning,
is now a single organized summary.
In my case, it looks like we need to update
to a newer version of Astro, something that’s beyond
just bumping the version number.
Fortunately, I can take the results of this automation,
and start a new session
right here inside of Copilot app.
So let’s ask Copilot, “Let’s update to Astro 6!”
and again, just like before,
off it goes using the context that it has right here.
Every automation run
shows up right here inside of ‘Automation’,
so that way I can always see what ran, when it ran,
and exactly what it did.
And if something
doesn’t look quite right,
it’s right there for me to review,
so my automations never feel like a black box,
working behind my back.
With automations, I can take a recurring chore,
describe it once, pick a trigger,
and let Copilot handle it.
My advice is to start exactly like we did here.
Pick a boring task,
the kind of things that you already
kind of do on autopilot, and hand it to the app.
And then, spend that attention
on what actually needs your judgment.
You can learn more in the rest
of this series and at gh.io/app
Ask follow-up questions or revisit key timestamps.
The video demonstrates how to use Copilot app automations to streamline tedious, repetitive tasks like managing Dependabot pull requests. By defining a task once with a trigger, such as a schedule, users can offload manual triaging to Copilot, which organizes PRs by risk, checks CI status, and provides summaries, allowing developers to focus on higher-level judgment tasks.
Videos recently processed by our community