Skip to content

Commit

Permalink
Add lock-threads GitHub action. (conda#10832)
Browse files Browse the repository at this point in the history
* Add lock-threads GitHub action.

This should help with handling old issues and PRs.

* Add locked label.

* Allow triggering the action manually.

* Rename to follow best practices.
  • Loading branch information
jezdez authored Aug 19, 2021
1 parent 04528fe commit 9835b11
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/lock-threads.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: 'Lock Threads'

on:
workflow_dispatch:
schedule:
- cron: '15 4 * * *'

permissions:
issues: write
pull-requests: write

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
id: lock-threads
with:
# Number of days of inactivity before a closed issue is locked
issue-lock-inactive-days: '365'
# Do not lock issues created before a given timestamp, value must follow ISO 8601
issue-exclude-created-before: ''
# Do not lock issues with these labels, value must be a comma separated list of labels or ''
issue-exclude-labels: ''
# Labels to add before locking an issue, value must be a comma separated list of labels or ''
issue-lock-labels: 'locked'
# Comment to post before locking an issue
issue-lock-comment: >
Hi there, thank you for your contribution to Conda!
This issue has been automatically locked since it
has not had recent activity after it was closed.
Please open a new issue for related bugs.
# Reason for locking an issue, value must be one of resolved, off-topic, too heated, spam or ''
issue-lock-reason: 'resolved'

# Number of days of inactivity before a closed pull request is locked
pr-lock-inactive-days: '365'
# Do not lock pull requests created before a given timestamp, value must follow ISO 8601
pr-exclude-created-before: ''
# Do not lock pull requests with these labels, value must be a comma separated list of labels or ''
pr-exclude-labels: ''
# Labels to add before locking a pull request, value must be a comma separated list of labels or ''
pr-lock-labels: 'locked'
# Comment to post before locking a pull request
pr-lock-comment: >
Hi there, thank you for your contribution to Conda!
This pull request has been automatically locked since it
has not had recent activity after it was closed.
Please open a new issue or pull request if needed.
# Reason for locking a pull request, value must be one of resolved, off-topic, too heated, spam or ''
pr-lock-reason: 'resolved'

# Limit locking to only issues or pull requests, value must be one of issues, prs or ''
process-only: ''

- name: Print outputs
run: echo ${{ join(steps.lock-threads.outputs.*, ',') }}

0 comments on commit 9835b11

Please sign in to comment.