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

Loop while Unlocking an Issue #23

Closed
nitheesh-daram opened this issue May 30, 2023 · 2 comments
Closed

Loop while Unlocking an Issue #23

nitheesh-daram opened this issue May 30, 2023 · 2 comments

Comments

@nitheesh-daram
Copy link

While Unlocking an issue with adding a label goes in a loop

unlocks -> locks again -> unlocks

my yml files look like this

lock-unlock.yml under .github/workflows/

name: 'lock/unlock issues'

on:
  issues:
    types: labeled

permissions:
  issues: write


jobs:
  action:
    runs-on: ubuntu-latest
    steps:
      - uses: dessant/label-actions@v3
        with:
          process-only : 'issues'
          config-path : '.github/lock-unlock.yml'

lock-unlock.yml under .github/

'🚦 status: awaiting triage':
  issues:
      comment: >
          some random
      lock : true

'🏁 status: ready for dev':
  issues:
      comment: >
            The thread has been temporarily unlocked.Please follow our community guidelines.
      unlock : true

##ScreenShots
image

@nitheesh-daram
Copy link
Author

nitheesh-daram commented May 30, 2023

This seems to happen only when you have a comment while unlocking

This is without any comment while unlocking
image

@dessant
Copy link
Owner

dessant commented May 30, 2023

The thread must be unlocked to post a comment, and because the action performs these tasks without taking into account the next step, we get this unnecessary unlocking and locking. We are going to check if there is any locking instruction in the list of tasks when making a comment to avoid this issue.

@dessant dessant closed this as completed in 8ebc35d Jun 6, 2023
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