Skip to content

Commit

Permalink
🔄 synced file(s) with conda/infrastructure (#661)
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 Apr 24, 2023
1 parent ed9b9cf commit da3eec2
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 37 deletions.
85 changes: 48 additions & 37 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,74 +14,85 @@ on:
schedule:
- cron: 0 4 * * *

permissions:
issues: write
pull-requests: write

jobs:
stale:
if: '!github.event.repository.fork'
runs-on: ubuntu-latest
strategy:
matrix:
# The issues labeled "support" have a more aggressive stale/close timeline from the rest
only-issue-labels: ['type::support', '']
include:
- only-issue-labels: ''
days-before-issue-stale: 365
days-before-issue-close: 30
# [type::support] issues have a more aggressive stale/close timeline
- only-issue-labels: type::support
days-before-issue-stale: 21
days-before-issue-close: 7
steps:
- id: read_yaml
uses: conda/actions/[email protected]
- uses: conda/actions/[email protected]
id: read_yaml
with:
path: https://raw.githubusercontent.com/conda/infra/main/.github/messages.yml
- uses: actions/stale@v4

- uses: actions/stale@v7
id: stale
with:
# Idle number of days before marking issues stale (default: 60)
days-before-issue-stale: ${{ matrix.only-issue-labels && 21 || 365 }}
# Idle number of days before closing stale issues/PRs (default: 7)
days-before-issue-close: ${{ matrix.only-issue-labels && 7 || 30 }}
# Idle number of days before marking PRs stale (default: 60)
# Only issues with these labels are checked whether they are stale
only-issue-labels: ${{ matrix.only-issue-labels }}

# Idle number of days before marking issues stale
days-before-issue-stale: ${{ matrix.days-before-issue-stale }}
# Idle number of days before closing stale issues/PRs
days-before-issue-close: ${{ matrix.days-before-issue-close }}
# Idle number of days before marking PRs stale
days-before-pr-stale: 365
# Idle number of days before closing stale PRs (default: 7)
# Idle number of days before closing stale PRs
days-before-pr-close: 30

# Comment on the staled issues
stale-issue-message: ${{ fromJSON(steps.read_yaml.outputs.value)['stale-issue'] }}
# Comment on the staled issues while closed
# close-issue-message: ${{ fromJSON(steps.read_yaml.outputs.value)['close-issue'] }}
# Comment on the staled PRs
stale-pr-message: ${{ fromJSON(steps.read_yaml.outputs.value)['stale-pr'] }}
# Comment on the staled PRs while closed
# close-pr-message: ${{ fromJSON(steps.read_yaml.outputs.value)['close-pr'] }}
# Label to apply on staled issues
stale-issue-label: 'stale'
stale-issue-label: stale
# Label to apply on closed issues
close-issue-label: 'stale::closed'
close-issue-label: stale::closed
# Reason to use when closing issues
close-issue-reason: not_planned

# Comment on the staled PRs
stale-pr-message: ${{ fromJSON(steps.read_yaml.outputs.value)['stale-pr'] }}
# Label to apply on staled PRs
stale-pr-label: 'stale'
stale-pr-label: stale
# Label to apply on closed PRs
close-pr-label: 'stale::closed'
close-pr-label: stale::closed
# Reason to use when closing PRs
close-pr-reason: not_planned

# Issues with these labels will never be considered stale
exempt-issue-labels: 'stale::recovered,epic'
# Issues with these labels will never be considered stale
exempt-pr-labels: 'stale::recovered,epic'
# Only issues with these labels are checked whether they are stale
only-issue-labels: ${{ matrix.only-issue-labels }}

# Max number of operations per run
operations-per-run: ${{ secrets.STALE_OPERATIONS_PER_RUN || 100 }}
# Remove stale label from issues/PRs on updates/comments
remove-stale-when-updated: true

# Add specified labels to issues/PRs when they become unstale
labels-to-add-when-unstale: 'stale::recovered'
labels-to-remove-when-unstale: 'stale,stale::closed'
labels-to-add-when-unstale: stale::recovered
# Remove specified labels to issues/PRs when they become unstale
labels-to-remove-when-unstale: stale,stale::closed

# Dry-run (default: false)
# Max number of operations per run
operations-per-run: ${{ secrets.STALE_OPERATIONS_PER_RUN || 100 }}
# Dry-run
debug-only: ${{ github.event.inputs.dryrun || false }}
# Order to get issues/PRs (default: false)
# Order to get issues/PRs
ascending: true
# Delete branch after closing a stale PR (default: false)
# Delete branch after closing a stale PR
delete-branch: false

# Issues with these labels will never be considered stale
exempt-issue-labels: stale::recovered,epic
# Issues with these labels will never be considered stale
exempt-pr-labels: stale::recovered,epic
# Exempt all issues/PRs with milestones from stale
exempt-all-milestones: true

# Assignees on issues/PRs exempted from stale
exempt-assignees: mingwandroid

Expand Down
10 changes: 10 additions & 0 deletions HOW_WE_USE_GITHUB.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
[workflow-sync]: https://github.com/conda/infra/blob/main/.github/workflows/sync.yml
[labels-global]: https://github.com/conda/infra/blob/main/.github/global.yml

[signing-commits]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

<!-- relative URLs -->
[workflow-issues]: /.github/workflows/issues.yml
[workflow-project]: /.github/workflows/project.yml
Expand All @@ -30,6 +32,7 @@ This document seeks to outline how we as a community use GitHub Issues to track
<!-- only include high-level topics or particularly noteworthy sections here -->
Topics:
- [What is Issue Sorting?](#what-is-issue-sorting)
- [Commit signing](#commit-signing)
- [Types of tickets](#types-of-tickets)
- [Normal Ticket/Issue](#normal-ticketissue)
- [Epics](#epics)
Expand Down Expand Up @@ -230,6 +233,13 @@ please post details to the [Nucleus forums](https://community.anaconda.cloud/).
In order to not have to manually type or copy/paste the above repeatedly, please note that it's possible to add text for the most commonly-used responses via [GitHub's "Add Saved Reply" option][docs-saved-reply].


### Commit signing

For all conda maintainers, we require commit signing and strongly recommend it for all others wishing to contribute to conda
related projects. More information about how to set this up within GitHub can be found here:

- [Signing Commits][signing-commits]

### Types of Tickets

#### Standard Ticket/Issue
Expand Down

0 comments on commit da3eec2

Please sign in to comment.