Skip to content
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

Make a slash command to get information of all the contributors #38 #40

Closed
wants to merge 6 commits into from

Conversation

Sarthak5598
Copy link
Member

@Sarthak5598 Sarthak5598 requested review from arkid15r and DonnieBLT May 30, 2024 18:19
Copy link
Contributor

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

It's a cool functionality extension, thanks @Sarthak5598!

Could you take a look at addressing the following when you get a chance:

Comment on lines +223 to +225
prs = requests.get(f'{GITHUB_API_URL}/repos/{owner}/{repo}/pulls?state=closed').json()
issues = requests.get(f'{GITHUB_API_URL}/repos/{owner}/{repo}/issues?state=closed').json()
comments = requests.get(f'{GITHUB_API_URL}/repos/{owner}/{repo}/issues/comments').json()
Copy link
Contributor

Choose a reason for hiding this comment

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

These requests would get 30 items max. If you need more use pagination.

You might want to take a look at PyGithub.

For now you could just bump the page_size to 100.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for the reccomendation ! , Can you please tell me what is the access token ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Here is an official doc. Generally, official documentation has/describes all terms.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you !

app.py Outdated Show resolved Hide resolved
app.py Outdated Show resolved Hide resolved
app.py Outdated Show resolved Hide resolved
app.py Outdated Show resolved Hide resolved
Sarthak5598 and others added 3 commits May 31, 2024 00:51
Co-authored-by: Arkadii Yakovets <[email protected]>
Co-authored-by: Arkadii Yakovets <[email protected]>
@Sarthak5598
Copy link
Member Author

Thanks for all the recommendations @arkid15r !

Copy link
Contributor

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

Please address the pre-commit errors

Comment on lines +252 to +254
table = "User | PRs Merged | Issues Resolved | Comments\n ---- | ---------- | --------------- | --------\n"
for user, counts in user_data.items():
table += f"{user} | {counts['prs']} | {counts['issues']} | {counts['comments']}\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest using list and append rows to it. Then you can join it with \n. Don't use string concatenation.

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