IvanFon / super-labeler-action

A superpowered issue and pull request labeler for Github Actions.
GNU General Public License v3.0
22 stars 12 forks source link

Error: already_exists when having more than 30 labels #25

Closed botchris closed 3 years ago

botchris commented 3 years ago

Describe the bug

seems like it tries to incorrectly create a label which already exists, it shows the following message:

Validation Failed: {"resource":"Label","code":"already_exists","field":"name"}

It looks like it only see the first 30 labels from the repo.

To Reproduce

Steps to reproduce the behavior:

  1. Have more than 30 labels created in the repo
  2. Start a new build

Expected behavior

It should not create an existing label

Config Add your labels.json config and Github Actions workflow:

private repo, cant provide due confidential issues.
on:
  pull_request:
    types: [opened, edited, closed, reopened, ready_for_review, synchronize]

jobs:
  label:
    runs-on: ubuntu-latest
    name: Label issues and pull requests
    steps:
      - uses: actions/checkout@v2
      - uses: IvanFon/super-labeler-action@master
        with:
          github-token: '${{ secrets.GITHUB_TOKEN }}'

Github Actions Output

private repo, cant provide due confidential issues.

TGTGamer commented 3 years ago

Heya @ChristopherCastro, thanks for reporting this issue. Firstly can you check to see if the issue is replicated when using our version of this action which has been updated and is currently undergoing maintenance. #24

# super Labeler
      - name: Super Labeller
        uses: Videndum/super-labeler-action@1.0.1
        with:
          GITHUB_TOKEN: '${{ secrets.BOT_TOKEN }}'

If you are still receiving this issue, please do the following:

  1. In your repository secrets create a new secret called ACTIONS_STEP_DEBUG with the data true
  2. Run the workflow which uses this action
  3. Verify issue persists
  4. Copy and paste your entire action logs

Copying the action logs doesn't reveal any secrets or confidential data - at most it may reveal the labels you are using. You are welcome to take a look through our debugging logs here if you want to see what sort of data is output.

Please feel free to open a ticket on https://github.com/Videndum/super-labeler-action and I can support you there with the latest version of this action.

TGTGamer commented 3 years ago

@ChristopherCastro I can confirm that this bug does not exist within the version maintained here: #24

This is due to the issue discussed in #18 which has been implemented for a while on the maintained repository.

If you are unsure still, here is confirmation from our debugging logs https://github.com/Videndum/super-labeler-action/runs/1388853315?check_suite_focus=true#step:3:33

// CLOSE ISSUE PLEASE

botchris commented 3 years ago

Oh, I see.

I can confirm that using Videndum/super-labeler-action@1.1.0 works pretty well when having more than 30 labels. However, suggested v.1.0.1 always fails for me with the error message "Cannot read property 'charAt' of undefined"