support for async call to repo sync by adding new method#76
Open
3choBoomer wants to merge 4 commits into
Open
Conversation
Ompragash
requested changes
Mar 19, 2026
Ompragash
left a comment
Member
There was a problem hiding this comment.
thanks for the PR! The approach of adding a dedicated method is clean and non-breaking. nice work.
|
Hi @3choBoomer 3choBoomer,
|
Author
|
@Ompragash @ebtasam-faridy I am currently traveling with family and I will circle back with you guys when I return to work on Thursday. |
Co-authored-by: OP (oppenheimer) <21008429+Ompragash@users.noreply.github.com>
Co-authored-by: OP (oppenheimer) <21008429+Ompragash@users.noreply.github.com>
ebtasam-faridy
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
RepoListSyncAsync()method to theClientinterface and its implementation. It posts to the same endpoint asRepoListSyncbut withasync=trueappended to the URL, causing the server to trigger the sync and return immediately.This is one of two proposed approaches to resolve #74, which has been open since 2024. See #XX for an alternative implementation that extends
RepoListSyncwith a functional options pattern instead.Changes
RepoListSyncAsync() ([]*Repo, error)to theClientinterface(c *client) RepoListSyncAsync()implementation inclient.goRepoListSyncis untouchedUsage
Notes
This approach keeps each method's intent explicit and self-documenting — the function name alone communicates the async behaviour without requiring callers to know about option constructors.
Alternatives
See #75 for an alternative that extends
RepoListSyncwith a functional options pattern instead. That approach keeps theClientinterface surface smaller and is more extensible if additional query parameters are needed in the future, at the cost of a slightly less obvious call site.