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

PR size labeler is not working #41

Closed
simrk opened this issue May 18, 2022 · 2 comments
Closed

PR size labeler is not working #41

simrk opened this issue May 18, 2022 · 2 comments

Comments

@simrk
Copy link

simrk commented May 18, 2022

Hi!
First of all, thank you for this action!

So here is our issue, it seems like the label isn't applied anymore. Here you can find the logs:

2022-05-17T13:12:19.8359002Z /src/github.sh: line 15: null: unbound variable
2022-05-17T13:12:19.8361467Z Total modifications (additions + deletions): 
2022-05-17T13:12:19.8362674Z Ignoring files (if present): 
2022-05-17T13:12:19.8372382Z /src/labeler.sh: line 49: [: : integer expression expected
2022-05-17T13:12:19.8372724Z /src/labeler.sh: line 51: [: : integer expression expected
2022-05-17T13:12:19.8373037Z /src/labeler.sh: line 53: [: : integer expression expected
2022-05-17T13:12:19.8373339Z /src/labeler.sh: line 55: [: : integer expression expected
2022-05-17T13:12:19.8375026Z Labeling pull request with size/xl
2022-05-17T13:12:20.1232720Z jq: error (at <stdin>:1): Cannot iterate over null (null)
2022-05-17T13:12:20.1255564Z Final labels: "size/xl"
2022-05-17T13:12:20.6126579Z {
2022-05-17T13:12:20.6127218Z   "message": "Not Found",
2022-05-17T13:12:20.6128176Z   "documentation_url": "https://docs.github.com/rest/reference/issues#create-an-issue-comment"
2022-05-17T13:12:20.6128657Z }
2022-05-17T13:12:20.7627548Z Cleaning up orphan processes

This is the dev workflow we have enabled:

name: Size Labeler

on: [pull_request]

jobs:
  labeler:
    runs-on: ubuntu-latest
    name: Label the PR size
    steps:
      - uses: codelytv/pr-size-labeler@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          xs_max_size: '10'
          s_max_size: '100'
          m_max_size: '500'
          l_max_size: '1000'
          fail_if_xl: 'false'
          message_if_xl: >
            'This PR exceeds the recommended size of 1000 lines.
            Please make sure you are NOT addressing multiple issues with one PR.
            Note this PR might be rejected due to its size.’
          github_api_url: 'api.github.com'

Can someone have a look at this?

@simrk simrk changed the title The PR size labeler is not working PR size labeler is not working May 18, 2022
@simrk
Copy link
Author

simrk commented May 18, 2022

Duplicate issue.

@simrk simrk closed this as completed May 18, 2022
@Leo6Leo
Copy link

Leo6Leo commented Jun 22, 2023

Just leave the solution link I found to save some time for people

#40 (comment)

name: labeler

on: [pull_request]

jobs:
  labeler:
    runs-on: ubuntu-latest
    name: Label the PR size
    steps:
      - uses: codelytv/pr-size-labeler@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          xs_label: 'size/xs'
          xs_max_size: '10'
          s_label: 'size/s'
          s_max_size: '100'
          m_label: 'size/m'
          m_max_size: '500'
          l_label: 'size/l'
          l_max_size: '1000'
          xl_label: 'size/xl'
          fail_if_xl: 'false'
          message_if_xl: >
            This PR exceeds the recommended max size of 1000 lines.
            Please make sure you are NOT addressing multiple issues with one PR.
          files_to_ignore: 'package-lock.json'

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

No branches or pull requests

2 participants