dessant / lock-threads

GitHub Action that locks closed issues, pull requests and discussions after a period of inactivity
https://github.com/marketplace/actions/lock-threads
MIT License
313 stars 34 forks source link

Lock discussions #25

Closed JustArchi closed 11 months ago

JustArchi commented 3 years ago

I'd love to be able to utilize your (awesome!) lock-threads GitHub action in order to automatically lock the discussions in addition to issues and PR.

Is something like that planned?

          discussion-lock-inactive-days: '365'
          discussion-exclude-created-before: ''
          discussion-exclude-labels: ''
          discussion-lock-labels: ''
          discussion-lock-comment: ''
          discussion-lock-reason: 'resolved'

Thank you in advance for considering it, I really appreciate your work on this project.

dessant commented 3 years ago

Hi @JustArchi! I think it would be useful to automatically lock resolved discussions that are inactive, but there does not seem to be a native feature to generally mark discussions as done on GitHub, unless you select the Q&A category, in which case you can mark a comment as an answer. We could begin to process discussion categories where answers are enabled.

https://github.com/github/feedback/discussions/43

https://docs.github.com/en/graphql/guides/using-the-graphql-api-for-discussions https://docs.github.com/en/graphql/reference/mutations#locklockable

I have no experience with the GraphQL API, though the lockLockable mutation will hopefully work for discussions.

JustArchi commented 3 years ago

Perhaps we could make it configurable through discussion-handle-answered-only: true or something similar, while I totally agree with you that this should be the default behaviour, I don't believe that somebody necro'ing 2-year-old inactive discussion is really going to add something valuable there 🙂.

In any case thanks a lot for considering it.

dessant commented 3 years ago

The GraphQL API can be used to lock discussions, I've recently implemented it for Label Actions. There's a feature request for closing or resolving discussions on GitHub: https://github.com/github/feedback/discussions/3097

Abrynos commented 1 year ago

Any progress on this? It's almost been a year :(

dessant commented 1 year ago

@Abrynos, I don't have much spare time to work for free in the next few months, but you can fund the development of the project if you'd like to see features implemented sooner. My contact information is on my profile page.

dessant commented 1 year ago

https://github.blog/changelog/2023-03-14-adding-the-ability-to-close-github-discussions/

shamoon commented 1 year ago

This also just dropped, seems useful! https://github.blog/changelog/2023-10-10-filter-answered-discussions-through-the-graphql-api/ (Filter discussions by “answered”)

shamoon commented 11 months ago

Awesome!