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

The label didn't apply to the top issues #5

Closed
palma21 opened this issue Jul 20, 2020 · 9 comments · Fixed by #21
Closed

The label didn't apply to the top issues #5

palma21 opened this issue Jul 20, 2020 · 9 comments · Fixed by #21

Comments

@palma21
Copy link

palma21 commented Jul 20, 2020

Hey, thanks for the action, not sure if you're still maintaining or accepting issues for this action. But I gave it shot but couldn't get it to work, not sure if I'm doing something wrong.

This was my simple workflow:

name: Label Top Issues

on:
  schedule:
  - cron:  '15 0-23 * * *'

jobs:
  labelTopIssues:
    name: Label Top Issues
    runs-on: ubuntu-latest
    steps:
    - name: Label Issues
      uses: adamzolyak/[email protected]
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        TOP_NUMBER_OF_ISSUES: 10
        TOP_LABEL_NAME: "Top 10 Issue"
        TOP_LABEL_COLOR: f442c2

But despite having issues with >50 '+1' it chose only from the first page and issues with no upvotes

Thank you

@adamzolyak
Copy link
Member

@palma21 thanks for the bug report. I'll take a look later this week.

@dgibbs64
Copy link

Can also confirm it is applying the label to issues with a single thumbs up.

@adamzolyak
Copy link
Member

Looks like the get all issues for repo request isn't paginated https://github.com/TinkurLab/top-issues-action/blob/master/helpers.js#L25. The API only returns a max of 100 issues for a repo without paging.

@teolemon
Copy link

@adamzolyak
Copy link
Member

@teolemon is this something you'd be interested in contributing a PR for? I'm not sure when I'm going to get to it.

@teolemon
Copy link

@openfoodfacts is keeping me a little too busy (and I don't feel technically confident to do it quickly)

@rickstaa
Copy link

rickstaa commented Sep 20, 2022

@palma21, @dgibbs64, @teolemon, perhaps https://github.com/rickstaa/top-issues-action solves your problems. Although it was initially meant to show a dashboard with top issues and pull requests, it can also be used to label these issues. It is paginated, so it will use all issues and Pull Requests.

@adamzolyak, the code that performs the pagination can be found in https://github.com/rickstaa/top-issues-action/blob/main/src/helpers.ts#L114-L168. Maybe it can help you solve #5.

@adamzolyak
Copy link
Member

This action now supports repos with any number of issues. See https://github.com/marketplace/actions/top-issues-labeler.

@rickstaa @teolemon @dgibbs64 @palma21 hope that resolves your issue. If not let me know.

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 a pull request may close this issue.

5 participants