-
Couldn't load subscription status.
- Fork 579
🌱 Add tagsHandler to githubrepo client #4770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4770 +/- ##
==========================================
+ Coverage 66.80% 68.22% +1.42%
==========================================
Files 230 251 +21
Lines 16602 19076 +2474
==========================================
+ Hits 11091 13015 +1924
- Misses 4808 5191 +383
- Partials 703 870 +167 🚀 New features to boost your workflow:
|
Signed-off-by: Adam Korczynski <[email protected]>
ad4d176 to
fea6945
Compare
|
This pull request has been marked stale because it has been open for 10 days with no activity |
|
@spencerschrock could you reopen this one, please? |
|
This pull request has been marked stale because it has been open for 10 days with no activity |
|
This pull request has been marked stale because it has been open for 10 days with no activity |
What kind of change does this PR introduce?
This adds a
tagsHandlerto thegithubrepoclient. ThetagsHandlerfollows a similar procedure as thebranchesHandlerand reuses many of its utilities. ThetagsHandlerimplements the following methods:init: Similar tobranchesHandler'sinit.setup: Fetches all rulesets and tags of the repository and stores it.query: Returns aclients.RepoRefof a branch.getTags: Returns a slice of all tags asRepoRef's with their rulesets.getTag: Callsqueryand returns theRepoRef.To implement this
tagsHandler, I have had to make a number of changes:BranchReftoRepoRef.branchref.Furthermore, I have added
GetTagandListTagsmethods to the repoclient interface and the clients that implement the repoclient. This is the most user-exposed thetagsHandlercurrently, and these two methods are not used anywhere. They are there to demonstrate the intent of how to use thegithubrepotagsHandler.The PR is quite large as it is now, so I'd prefer to follow up with probes for this once it is merged.
(Is it a bug fix, feature, docs update, something else?)
What is the current behavior?
What is the new behavior (if this is a feature change)?**
Which issue(s) this PR fixes
Fixes #10 and #2476
Special notes for your reviewer
Does this PR introduce a user-facing change?
For user-facing changes, please add a concise, human-readable release note to
the
release-note(In particular, describe what changes users might need to make in their
application as a result of this pull request.)