Skip to content

Commit

Permalink
🔄 Synced file(s) with conda/infra (conda#11262)
Browse files Browse the repository at this point in the history
Co-authored-by: Conda Bot <[email protected]>
  • Loading branch information
conda-bot and conda-bot authored Mar 3, 2022
1 parent ce5a8a7 commit 1905ece
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 76 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,56 @@
name: 'Lock Threads'
name: Lock

on:
# NOTE: github.event is workflow_dispatch payload:
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch
workflow_dispatch:
# inputs:
# dryrun:
# description: "dryrun: Preview locking issues/prs without marking them (true|false)"
# required: true
# default: "true"

schedule:
- cron: '0 6 * * *'
- cron: 0 6 * * *

permissions:
issues: write
pull-requests: write

jobs:
action:
lock:
if: '!github.event.repository.fork'
runs-on: ubuntu-latest
steps:
- id: read_yaml
uses: conda/actions/[email protected]
with:
path: https://raw.githubusercontent.com/conda/infra/main/.github/messages.yml
- 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'
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 if needed.
issue-lock-comment: ${{ fromJSON(steps.read_yaml.outputs.value)['lock-issue'] }}
# 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'
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.
pr-lock-comment: ${{ fromJSON(steps.read_yaml.outputs.value)['lock-pr'] }}
# Reason for locking a pull request, value must be one of resolved, off-topic, too heated, spam or ''
pr-lock-reason: 'resolved'

Expand Down
80 changes: 22 additions & 58 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
name: 'Stale'
name: Stale

on:
# NOTE: github.event is workflow_dispatch payload:
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch
workflow_dispatch:
inputs:
dryrun:
description: "dryrun: Preview stale issues/prs without marking them (true|false)"
required: true
default: "true"

schedule:
- cron: '0 4 * * *'
- cron: 0 4 * * *

jobs:
stale:
if: '!github.event.repository.fork'
runs-on: ubuntu-latest
steps:
- id: read_yaml
uses: conda/actions/[email protected]
with:
path: https://raw.githubusercontent.com/conda/infra/main/.github/messages.yml
- uses: actions/stale@v4
id: stale
with:
Expand All @@ -16,68 +30,18 @@ jobs:
# Idle number of days before closing stale issues/PRs (default: 7)
days-before-issue-close: 90
# Idle number of days before marking PRs stale (default: 60)
days-before-pr-stale: 360
days-before-pr-stale: 365
# Idle number of days before closing stale PRs (default: 7)
days-before-pr-close: 30

# Comment on the staled issues
stale-issue-message: |
Hi there, thank you for your contribution to Conda!
This issue has been **automatically marked as stale** because it has not had recent activity. It will be closed automatically if no further activity occurs.
If you would like this issue to remain open please:
1. Verify that you can still reproduce the issue in the latest version of Conda
2. Comment that the issue is still reproducible and include:
- What version of Conda you reproduced the issue on
- What OS and version you reproduced the issue on
- What steps you followed to reproduce the issue
3. It would also be helpful to have the output of the following commands available:
- `conda info`
- `conda config --show-sources`
- `conda list --show-channel-urls`
**NOTE:** If this issue was closed prematurely, please leave a comment and we will gladly reopen the issue.
In case this issue was originally about a project that is covered by the [Anaconda issue tracker](https://github.com/ContinuumIO/anaconda-issues/issues) (e.g. Anaconda, Miniconda, packages built by Anaconda, Inc. like Anaconda Navigator etc), please reopen the issue there again.
Thanks!
stale-issue-message: ${{ fromJSON(steps.read_yaml.outputs.value)['stale-issue'] }}
# Comment on the staled issues while closed
close-issue-message: |
Hi again!
This issue has been closed since it has not had recent activity.
Please don't hesitate to leave a comment if that was done prematurely.
Thank you for your contribution.
close-issue-message: ${{ fromJSON(steps.read_yaml.outputs.value)['close-issue'] }}
# Comment on the staled PRs
stale-pr-message: |
Hi there, thank you for your contribution to Conda!
This pull request has been **automatically marked as stale** because it has not had recent activity. It will be closed automatically if no further activity occurs.
If you would like this pull request to remain open please:
1. Update the pull request with the latest code in the main branch
2. Verify that the pull request change is still working and update it if needed
3. Leave a comment with the current status of the pull request
**NOTE:** If this pull request was closed prematurely, please leave a comment.
Thanks!
stale-pr-message: ${{ fromJSON(steps.read_yaml.outputs.value)['stale-pr'] }}
# Comment on the staled PRs while closed
close-pr-message: >
Hi again!
This pull request has been closed since it has not had recent activity.
Please don't hesitate to leave a comment if that was done prematurely.
Thank you for your contribution.
close-pr-message: ${{ fromJSON(steps.read_yaml.outputs.value)['close-pr'] }}
# Label to apply on staled issues
stale-issue-label: 'stale'
# Label to apply on closed issues
Expand All @@ -102,7 +66,7 @@ jobs:
labels-to-remove-when-unstale: 'stale,stale::closed'

# Dry-run (default: false)
debug-only: false
debug-only: ${{ github.event.inputs.dryrun || false }}
# Order to get issues/PRs (default: false)
ascending: true
# Delete branch after closing a stale PR (default: false)
Expand Down

0 comments on commit 1905ece

Please sign in to comment.