Skip to content

Add InstallationsCount to App - #2765

Merged
gmlewis merged 1 commit into
google:masterfrom
chmouel:addinstallcount
Apr 19, 2023
Merged

Add InstallationsCount to App#2765
gmlewis merged 1 commit into
google:masterfrom
chmouel:addinstallcount

Conversation

@chmouel

@chmouelchmouel commented Apr 19, 2023

Copy link
Copy Markdown
Contributor

It's not in the official github documentation yet but exposed to the API.

% curl -s -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer $T" https://api.github.com/app|grep installations_count
"installations_count": 3

@gmlewisgmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @chmouel .
Please run go generate ./... at the top of the repo and push the results to this PR.
See CONTRIBUTING.md for more details.

Comment threadgithub/apps.go Outdated
@gmlewisgmlewis changed the title Add InstallationsCount to appps.AppAdd InstallationsCount to apps.AppApr 19, 2023
@gmlewisgmlewis changed the title Add InstallationsCount to apps.AppAdd InstallationsCount to AppApr 19, 2023
@gmlewis

Copy link
Copy Markdown
Collaborator

Please see the other change I asked for above and also please make sure all unit tests pass before pushing (not force-pushing since we always squash-and-merge in this repo) changes to the PR.

@chmouel

Copy link
Copy Markdown
ContributorAuthor

@gmlewis apologies for the noise, i kinda messed my pr!

@gmlewis

Copy link
Copy Markdown
Collaborator

@gmlewis apologies for the noise, i kinda messed my pr!

No problem, @chmouel ! There's no rush... please feel free to take as long as you wish.

@chmouel

chmouel commented Apr 19, 2023

Copy link
Copy Markdown
ContributorAuthor

I am not really sure why it fails on CI as it works locally

% go clean -testcache
% go generate github.com/google/go-github/..
% go test github.com/google/go-github/...
? github.com/google/go-github/v51/test/fields	[no test files]
? github.com/google/go-github/v51/test/integration	[no test files]
ok github.com/google/go-github/v51/github	0.898s

is it because i am using go 1.20 ?

Signed-off-by: Chmouel Boudjnah <chmouel@chmouel.com>
@chmouel

chmouel commented Apr 19, 2023

Copy link
Copy Markdown
ContributorAuthor

ah it works better with go generate -x should we maybe update CONTRIBUTING.md ? or maybe was there any other caching somewhere on my system, because -x is only supposed to print...

@codecov

codecovBot commented Apr 19, 2023

Copy link
Copy Markdown

Codecov Report

Merging #2765 (9d5f093) into master (693ddff) will not change coverage.
The diff coverage is n/a.

@@ Coverage Diff @@## master #2765 +/- ##
=======================================
Coverage 98.05% 98.05% =======================================
Files 132 132 Lines 11638 11638 =======================================
Hits 11412 11412 Misses 154 154 Partials 72 72 
Impacted FilesCoverage Δ
github/apps.go95.16% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@gmlewis

Copy link
Copy Markdown
Collaborator

ah it works better with go generate -x should we maybe update CONTRIBUTING.md ?

Feel free to clarify if you think that would be helpful.

@chmouel

chmouel commented Apr 19, 2023

Copy link
Copy Markdown
ContributorAuthor

Feel free to clarify if you think that would be helpful.

I think it was not just my day today, and just was too quick without thinking much, apologies again for the noise, will be careful next time when contributing.

(I missed a dot to go generate github.com/google/go-github/.. 🤦🏻 )

@gmlewis

Copy link
Copy Markdown
Collaborator

No worries! Glad you got it all worked out. 😁

@gmlewisgmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @chmouel !
LGTM.
Merging.

@gmlewis
gmlewis merged commit 848d85f into google:masterApr 19, 2023
@chmouel
chmouel deleted the addinstallcount branch April 19, 2023 17:25
jlaportebot added a commit to jlaportebot/go-github that referenced this pull request Jun 28, 2026
Sign up for freeto 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

@chmouel@gmlewis