Skip to content

forge: Genericize github handling into a forge abstraction#249

Open
jerry-skydio wants to merge 1 commit into
mainfrom
jerry/revup/main/forge
Open

forge: Genericize github handling into a forge abstraction#249
jerry-skydio wants to merge 1 commit into
mainfrom
jerry/revup/main/forge

Conversation

@jerry-skydio

@jerry-skydio jerry-skydio commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Clean up and isolate the github specific code behind a forge
abstraction. This makes it possible to add tests with dummy forge
backends and also makes it easier to add more forges in the future.

Update comments, prints, and docs where necessary.

--github-oauth and --github-url remain as backward compatibility
for forge-oauth and forget-url. github-username has been removed
completely as it hasn't been used in a long time.

Clean up and isolate the github specific code behind a forge
abstraction. This makes it possible to add tests with dummy forge
backends and also makes it easier to add more forges in the future.

Update comments, prints, and docs where necessary.

--github-oauth and --github-url remain as backward compatibility
for forge-oauth and forget-url. github-username has been removed
completely as it hasn't been used in a long time.
@jerry-skydio

jerry-skydio commented May 20, 2026

Copy link
Copy Markdown
Collaborator Author

Reviews in this chain:
#249 forge: Genericize github handling into a forge abstraction
 └#250 test: Expand upload tests with fake_forge
  └#253 github: Add graphql utility class to contain query fields
   └#254 github: Add request retry splitting

@jerry-skydio

jerry-skydio commented May 20, 2026

Copy link
Copy Markdown
Collaborator Author
# head base diff date summary
0 2bc698e6 d937b197 diff May 19 17:58 PM 21 files changed, 1106 insertions(+), 1116 deletions(-)
1 3b0639b4 d937b197 diff May 19 18:13 PM 5 files changed, 69 insertions(+), 67 deletions(-)
2 bd7abad6 d937b197 diff May 19 18:15 PM 0 files changed
3 98287168 d937b197 diff May 20 14:15 PM 1 file changed, 1 insertion(+), 4 deletions(-)

@jerry-skydio jerry-skydio force-pushed the jerry/revup/main/forge branch from 2bc698e to 3b0639b Compare May 20, 2026 01:13
@jerry-skydio jerry-skydio changed the title Genericize GitHub into a Forge abstraction forge: Genericize github handling into a forge abstraction May 20, 2026
@jerry-skydio jerry-skydio force-pushed the jerry/revup/main/forge branch from 3b0639b to bd7abad Compare May 20, 2026 01:15
@jerry-skydio jerry-skydio force-pushed the jerry/revup/main/forge branch from bd7abad to 9828716 Compare May 20, 2026 21:15
Comment thread revup/forge_utils.py

def parse_forge_info(remote_url: str, forge_url: str) -> ForgeRepoInfo:
"""
Parse owner and repo name from a remote URL, matching against the given forge host.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Technically this only works for "github-like" forges (gitlab, forgejo, etc) and won't work for e.g. sourcehut, radicle, or gerrit. It's also unlikely revup would ever support those though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants