-
Notifications
You must be signed in to change notification settings - Fork 6
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
Conversation
There was a problem hiding this 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:
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() |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you !
Co-authored-by: Arkadii Yakovets <[email protected]>
Co-authored-by: Arkadii Yakovets <[email protected]>
Thanks for all the recommendations @arkid15r ! |
There was a problem hiding this 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
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" |
There was a problem hiding this comment.
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.
OWASP-BLT/BLT#3409