Skip to content

Commit

Permalink
docs(examples): add a multiple-cron jobs example
Browse files Browse the repository at this point in the history
  • Loading branch information
C0ZEN committed Feb 7, 2022
1 parent 4c92a80 commit d57bc19
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ tags:

## Stale all issues with comments except if somebody is assigned {#stale-all-issues-with-comments-except-if-somebody-is-assigned}

### Description
### Description {#description}

The label `ìnactive` will be added on all issues without any activity during the last 45 days, except if someone is assigned to it or if this is either a frozen bug, a bug that need help or a confirmed bug.
A comment will also be added to warn the people about this.
If there is still no activity after two weeks, the issue will be closed and the `closed-due-to-inactivity` label will be added.

### Example
### Example {#example}

```yml
# ...
Expand Down
50 changes: 50 additions & 0 deletions documentation/docs/09-examples/02-multiple-cron.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
id: multiple-cron-example
title: Multiple cron jobs
description: |
Example to process only the issues that belongs to specific projects.
They will not be process at the same rate due to the different workflows.
tags:
- Issues
- Projects
- Examples
- Cron
---

## Stale sooner based on the project {#stale-sooner-based-on-the-project}

### Description {#description}

The issues belonging to the project X will be stale after only 20 days.
The issues belonging to the project Y will be stale after 50 days.
All the other issues will be ignored from the processing.

### Example {#example}

```yml title=".github/workflows/stale-project-x.yml"
name: Stale project X
on:
schedule:
- cron: '0 12 * * *'
jobs:
name: Stale
id: stale
uses: sonia-corporation/stale@latest
with:
issue-only-any-project-cards: project-x
issue-days-before-stale: 20
```

```yml title=".github/workflows/stale-project-y.yml"
name: Stale project Y
on:
schedule:
- cron: '0 12 * * *'
jobs:
name: Stale
id: stale
uses: sonia-corporation/stale@latest
with:
issue-only-any-project-cards: project-y
issue-days-before-stale: 50
```

0 comments on commit d57bc19

Please sign in to comment.