-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Background
Going off of an ongoing discussion for how we should be supporting forking repositories from hands-ons and exercise download definitions: #78
Core problem: deleting a repository through Github CLI requires the delete_repo scope that does not exist by default (it has to be added via gh auth refresh -s delete_scope).
Changes
As part of this discussion, we made several decisions:
- I have rolled out utility functions for the Github CLI in
exercise_utils/github_cli.py(here) (more below) - We have decided that the
__requires_github__andrequires_githubfields will automatically check if the current auth status containsdelete_scope. If it doesn't it will immediately fail the operation (here) - By default, when a student sets up the Git-Mastery app, students should auth the
delete_scopetoken scope
Github CLI exercise utility
Right now, we support:
- Getting the Github username of a student
- Forking a repository
- Cloning a repository
- Deleting a repository
- Creating a repository
- Checking if a repository exists
Am I affected by this?
For all contributors, thank you for your patience so far, these are the current open PRs affected by this change. Please check once you have applied the fix.
- Implement hands on hp-populate-remote #78 @oadultradeepfield
- Implement hands on hp-sync-upstream #97 @vanphuc1201
- Implement hands on hp-pull-remote #100 @lavanyagarg112
- Implement hands on hp-push-tags #103 @dingZvel
- Implement hands on hp-add-tags #110 @izruff
- Implement hands on hp-move-tags #111 @PriyadarshiCharvi
- Implement hands on hp-force-push #116 @TheMythologist
What do I do?
@damithc Could you help to update the installation instructions with the step to run: gh auth refresh -s delete_repo?
For those pinged, please do the following changes:
- Rebase your changes on top of
mainto get the latest changes:git fetch origin main && git rebase origin/main - Update the download functions using the new utility functions and if you do require deleting a fork, make sure that
__requires_github__is set toTrue - For all fork names, please use the following naming convention: gitmastery-{upstream repo name} since they might be reused across hands-ons/exercises
- Ping me for a re-review.
Feel free to clarify with me if there are any issues.
Thank you for your time!
VikramGoyal23 and oadultradeepfield
Metadata
Metadata
Assignees
Labels
No labels