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

proposal: Lock issues(?) #308

Closed
Andre601 opened this issue Nov 15, 2020 · 14 comments
Closed

proposal: Lock issues(?) #308

Andre601 opened this issue Nov 15, 2020 · 14 comments
Assignees
Labels

Comments

@Andre601
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I'm unable to find an option in the label-commenter-config.yml to lock an issue in order to prevent things like Spam or similar, which makes me assume that this Action doesn't have such an option to begin with.

Describe the solution you'd like
It would be nice to have the option, to also lock an issue alongside closing it.
the actions could simply be called lock and unlock and perhaps an additional option to set the reason for why it was locked could be added too.

Examples:

labels:
  # User spammed an issue and comments
  - name: 'Locked (Spam)'
    labeled:
      issue:
        body: |-
          This issue has been **LOCKED** because of spam!
          
          Please do not spam messages and/or issues on the issue tracker. You may get blocked from this repository for doing so.
        action: 'lock'
        reason: 'spam'
  # User send very heated (aggressive) messages
  - name: 'Locked (Heated Chat)'
    labeled:
      issue:
        body: |-
          This issue has been **LOCKED** because of heated conversation!
          
          We appreciate exciting conversations, as long as they won't become too aggressive and/or emotional.
        action: 'lock'
        reason: 'heated'
  # Issue was completely off-topic or messages where not about the issue itself
  - name: 'Locked (Off-topic)'
    labeled:
      issue:
        body: |-
          This issue has been **LOCKED** because of Off-topic conversations!
          
          While we do appreciate conversations in issues would we like to keep them on the topic of the issue.
          Please use our other means of communication for casual chats.
        action: 'lock'
        reason: 'off-topic'
  # Issue was resolved and future messages should be avoided
  - name: 'Locked (Resolved)'
    labeled:
      issue:
        body: |-
          This issue has been **LOCKED** because of it being resolved!
          
          The issue has been fixed and is therefore considered resolved.
          If you still encounter this or it has changed, open a new issue instead of responding to solved ones.
        action: 'lock'
        reason: 'resolved'

GitHub does offer the above 4 reasons (Off-topic, Too Heated, Resolved and Spam) when locking an issue which is optional.

Describe alternatives you've considered
The only option is a manual lock of the issue.

Additional context

@github-actions
Copy link
Contributor

Thank you @Andre601 for suggesting this.

@peaceiris
Copy link
Owner

peaceiris commented Nov 20, 2020

I will consider this.

The field name lock_reason is better than reason, I think.

  • off-topic: lock and close
  • too heated: do nothing
  • resolved: lock and close
  • spam: lock and close

related functions:

@Andre601
Copy link
Contributor Author

I don't think that "too heated" should be nothing.
It can easly mean "Extremely agressive and insulting chats"

@peaceiris
Copy link
Owner

We can add new fields lock and lock_reason to enable choosing whether we close an issue (Pull Request) before locking.

@github-actions
Copy link
Contributor

This issue has been LOCKED because of it being resolved!

The issue has been fixed and is therefore considered resolved.
If you still encounter this or it has changed, open a new issue instead of responding to solved ones.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2020
Repository owner unlocked this conversation Nov 24, 2020
@peaceiris
Copy link
Owner

like this

@peaceiris peaceiris reopened this Nov 24, 2020
@Andre601
Copy link
Contributor Author

Looks really nice.

I also see you added a sort of Footer?
In that case would it perhaps be a useful thing to auto-add a footer that informs people, that the message was send through a GitHub Action and that responding to it or mentioning the bot account has no influence.

Similar to what I setup in one of the repos I contribute towards.
image

@peaceiris
Copy link
Owner

peaceiris commented Nov 25, 2020

I opened #318

#317 has been merged.

TODO:

@github-actions
Copy link
Contributor

Hi, there.

This issue has been LOCKED because of heated conversation!

We appreciate exciting conversations, as long as they won't become too aggressive and/or emotional.

This is an automated comment created by the peaceiris/actions-label-commenter. Responding to the bot or mentioning it won't have any effect.
bot setting file, GitHub Actions workflow file

@github-actions github-actions bot locked as too heated and limited conversation to collaborators Nov 25, 2020
@github-actions
Copy link
Contributor

Hi, there.

This issue has been unlocked now.

This is an automated comment created by the peaceiris/actions-label-commenter. Responding to the bot or mentioning it won't have any effect.
bot setting file, GitHub Actions workflow file

@github-actions github-actions bot unlocked this conversation Nov 25, 2020
@Andre601
Copy link
Contributor Author

👍

@peaceiris
Copy link
Owner

Version v1.8.0 has been released and the v1 tag updated now.

Release actions-label-commenter v1.8.0 · peaceiris/actions-label-commenter

Thank you!

@peaceiris peaceiris unpinned this issue Jun 17, 2021
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