-
Notifications
You must be signed in to change notification settings - Fork 66
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
ci: new github action which logs all the reactions in prs and issues #220
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.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
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.
looks good but can this be done with https://github.com/actions/github-script and not curl and bash?
script action already contains GitHub REST Client
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.
few final questions
also, is there a repo where you test it that code works?
@KhudaDad414 can you also have a look at this workflow? I was thinking if maybe we should first add it to only one repo, to see how it works 🤔 |
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.
Do we have an estimation of how many API calls will it make for all repos?
@derberg I tested this in my fork and everything seems to be in order so I don't see the point. 🤔 |
Hey Khuda, yes we do have. One API call per repo, then as many calls as |
@14Richa it is actually more. Single request fetch no more than 100 issues (I don't know what is the default in UI I can query for issues that have a certain amount of reactions: https://github.com/asyncapi/website/issues?q=is%3Aissue+reactions%3A%3E5 so if REST API does not enable you to do this, maybe GraphQL API will? one small concern I have is that |
Uhm, I see. Let me think more about this. |
Co-authored-by: Khuda Dad Nomani <[email protected]>
I agree. I guess we'd have to loop over the paginated results.
I think the GitHub GraphQL API does not provide a direct way to filter issues based on the number of reactions.
Agree with this. I modified the GitHub action on my local repo to test it. It works fine but it increases the API calls and the filtering still happens client side. |
pagination plugin that you use there already handles that, just make sure page size is max
yeah, I bet the amount of calls multiply a lot
I just tried
result
but now I'm thinking.... @KhudaDad414 aren't you actually doing it in your community dashboard for hot issues? with such search query we do not need the action to run in all repos, but just in one. Still no solution for comments.... |
I see, I didn't know about that way. I had tried and couldn't find a neat way to add filter from the nested
|
a9326d1
to
121ce22
Compare
@derberg, yes we are using @14Richa have you checked https://github.com/asyncapi/website/blob/master/scripts/dashboard/issue-queries.js ? there are some queries that might be helpful. also since you are going to query the reactions on the comments as well, it can consume more points which need to be tested. |
This pull request has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
Description
A GitHub action that calls API on every issue and PR and labels
(community-attention)
in the issues and PR which have more than 5 reactions.Pre-requisite
Ensure the label we are trying to add ("more than 5 reactions") already exists in the repository.
If it doesn't exist, you'll need to create it first using the GitHub web interface.
Related issue(s)
Resolves: #41