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

GitHub workflow does not fail when some labels were not applied #78

Closed
adrianbroher opened this issue Apr 26, 2020 · 4 comments
Closed
Labels

Comments

@adrianbroher
Copy link

adrianbroher commented Apr 26, 2020

Hi, I'm currently testing out your github action and I came accross several problems:

When running a workflow this action does not mark the workflow as failed in case a label could not be applied. Another problem are the error annotations in the workflow overview. You cannot identify the failing label from the annotation alone. You have to look into the log file to identify the problem.

Workflow file:

name: Set Project labels
on: push
jobs:
  project-labeler:
    name: Project Labeler
    runs-on: ubuntu-18.04
    steps:
      - name: Checkout sources
        uses: actions/checkout@v2
      - name: Run Labeler
        if: success()
        uses: crazy-max/ghaction-github-labeler@v1
        with:
          yaml_file: .github/project-labels.yml
          dry_run: ${{ 'refs/heads/master' != github.ref }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

project-labels.yml (shortened)

- name: "status:testing requested"
  color: "c5def5"
  description: "The Implementation is ready for testing but can't be tested sufficiently by the developer and they request testing by other developers."

GitHub action log:

🎨 Creating 'status:testing requested' label with color 'c5def5' and desc 'The Implementation is ready for testing but can't be tested sufficiently by the developer and they request testing by other developers.'
##[error]Validation Failed: {"resource":"Label","code":"custom","field":"description","message":"description is too long (maximum is 100 characters)"}

Workflow annotations:
workflow-annotations

@adrianbroher adrianbroher changed the title GitHub workflow does not fail when some labels were not appied. GitHub workflow does not fail when some labels were not applied Apr 26, 2020
crazy-max added a commit that referenced this issue Apr 26, 2020
Enhanced annotations messages (#78)
@crazy-max
Copy link
Owner

Hi @adrianbroher,

Can you test my latest changes: crazy-max/ghaction-github-labeler@master?

@adrianbroher
Copy link
Author

adrianbroher commented Apr 26, 2020

Hello @crazy-max . Thanks for the prompt fix, the workflow now fails when the message is overlong and recovers when it is shortened to a valid length. I consider this issue fixed.

However the issue regarding the not so helpful annotation still persistst. Should I create a dedicated issue for that?

@crazy-max
Copy link
Owner

@adrianbroher

However the issue regarding the not so helpful annotation still persistst. Should I create a dedicated issue for that?

Label name and assertion type have been added as you can see in your failed build:

image

Cannot update "status:merged" label: ...

@adrianbroher
Copy link
Author

Oh, I didn't look at the message in detail. Then this issue is fixed. Thank you very much. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants