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

Label sync job completes, but does not update or change labels #79

Open
mrz1836 opened this issue Apr 11, 2023 · 9 comments
Open

Label sync job completes, but does not update or change labels #79

mrz1836 opened this issue Apr 11, 2023 · 9 comments

Comments

@mrz1836
Copy link

mrz1836 commented Apr 11, 2023

Hi! I have used this workflow in many repositories, private and public and it was working great. However, in my most recent repository, the label sync is not working. The job completes successfully, no error, and no labels affected.

Example running the workflow:
Screenshot 2023-04-11 at 8 11 47 AM

Example of old labels:
Screenshot 2023-04-11 at 8 12 00 AM

Here is my .labels file which triggers the build:

Screenshot 2023-04-11 at 8 12 10 AM

Any ideas why its failing? Did GitHub change something?

@mrz1836
Copy link
Author

mrz1836 commented Apr 11, 2023

Here is also the workflow

# Workflow: https://github.com/micnncim/action-label-syncer
# Export your labels: https://github.com/micnncim/label-exporter
name: sync-labels
on:
  push:
    branches:
      - master
    paths:
      - .github/labels.yml
jobs:
  sync-labels:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: micnncim/action-label-syncer@v1.3.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          manifest: .github/labels.yml

@mrz1836
Copy link
Author

mrz1836 commented Apr 17, 2023

Hi @micnncim ! Any chance you can check this out? It has been happening to new repos in the past two weeks I have noticed.

@mrz1836
Copy link
Author

mrz1836 commented Apr 17, 2023

I figured out the issue. Repos by default don't have enough permissions. However, it would be nice to error out so that the user knows there is an issue.

This is the setting that made it work:

Screenshot 2023-04-17 at 2 14 51 PM

@thclark
Copy link

thclark commented May 18, 2023

Yeah unfortunately it's pretty difficult to tell if this is the issue, we need (if nothing else) the responses printed.

@klaasnicolaas
Copy link

klaasnicolaas commented May 22, 2023

Not really an issue, it's a matter of setting the right permissions for the workflow.

permissions:
  pull-requests: write

Or you can adjust the general workflow permissions setting (like screenshot above) in your actions settings.

@hugovk
Copy link
Contributor

hugovk commented Jul 3, 2023

Note, needs a dash not an underscore:

permissions:
  pull-requests: write

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

Otherwise you'll get:

The workflow is not valid. .github/workflows/labels.yml (Line: 4, Col: 3): Unexpected value 'pull_requests'

@lucacome
Copy link

I can't get it to work, my workflow is in a central repo, has read and write permissions like shown in the screenshot above and no permissions set in the workflow, and I see this in the logs

label: epic deleted from: nginxinc/kubernetes-ingress
label: release engineering deleted from: nginxinc/kubernetes-ingress
label: investigating deleted from: nginxinc/kubernetes-ingress
label: story deleted from: nginxinc/kubernetes-ingress

but the labels are still there.

I also noticed that this was happening for a while even when the workflow was running in the same repo (that has the same settings).

@hugovk

This comment was marked as resolved.

Repository owner deleted a comment from raviikushh Feb 23, 2024
@ausfestivus
Copy link

Im having the same issues as others have reported above. It runs but doesnt actually do anything. No errors, warnings or anything.

Ive asked if the action should now be considered abandoned.

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

7 participants
@lucacome @hugovk @mrz1836 @thclark @klaasnicolaas @ausfestivus and others