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

Error: already_exists when having more than 30 labels #25

Closed
botchris opened this issue Nov 6, 2020 · 3 comments
Closed

Error: already_exists when having more than 30 labels #25

botchris opened this issue Nov 6, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@botchris
Copy link

botchris commented Nov 6, 2020

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.

@botchris botchris added the bug Something isn't working label Nov 6, 2020
@TGTGamer
Copy link

TGTGamer commented Nov 6, 2020

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
Copy link

@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
Copy link
Author

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants