Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add repoRecentReleases #4

Merged
merged 4 commits into from
Jul 16, 2024
Merged

feat: add repoRecentReleases #4

merged 4 commits into from
Jul 16, 2024

Conversation

aymanbagabas
Copy link
Member

Adds a repoRecentReleases command that fetches the latest releases for a given repository.

Reference: muesli#84

Adds a `repoRecentReleases` command that fetches the latest releases for
a given repository.

Reference: muesli#84
@coveralls
Copy link

coveralls commented Jul 9, 2024

Pull Request Test Coverage Report for Build 9875532248

Details

  • 0 of 26 (0.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 0.0%

Changes Missing Coverage Covered Lines Changed/Added Lines %
main.go 0 1 0.0%
repos.go 0 25 0.0%
Totals Coverage Status
Change from base Build 9862184938: 0.0%
Covered Lines: 0
Relevant Lines: 459

💛 - Coveralls

repos.go Outdated Show resolved Hide resolved
repos.go Show resolved Hide resolved
repos.go Outdated Show resolved Hide resolved
@bashbunni
Copy link
Member

Looks great! I agree with what Carlos said, but don't have anything to point out beyond that :)

@@ -298,6 +304,40 @@ func repo(owner, name string) Repo {
}
}

func repoRecentReleases(owner, name string, count int) []Release {
var releases []Release
Copy link
Member

Choose a reason for hiding this comment

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

beware though, the api might not actually reply with that many repos...

probably better to move this line a couple of lines down and do

releases := make([]Release, len(repoRecentReleasesQuery.Repository.Releases.Nodes))

aymanbagabas and others added 3 commits July 10, 2024 09:52
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Copy link
Member

@bashbunni bashbunni left a comment

Choose a reason for hiding this comment

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

Works great, just tested it locally with my draft branch 👍

image

@aymanbagabas aymanbagabas merged commit fadffa2 into master Jul 16, 2024
9 checks passed
@aymanbagabas aymanbagabas deleted the recent-releases branch July 16, 2024 19:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants