name: "๐ท๏ธ Issues, PRs and Stale Management"
on:
push:
branches:
- develop
issues:
types: [opened, edited]
pull_request_target:
types: [opened, synchronize]
schedule:
- cron: '0 0 * * *'
permissions:
contents: read
jobs:
labeler:
if: github.event_name != 'push' && github.event_name != 'schedule'
permissions:
contents: read
issues: write
pull-requests: write
runs-on: ubuntu-latest
name: "๐ท๏ธ Label issues and PRs"
steps:
- name: ๐ก๏ธ Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d with:
egress-policy: audit
- name: ๐ Generate ephemeral token from GitHub App
id: app-token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 with:
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_KEY }}
- name: ๐ท๏ธ Label issues and PRs
id: labeler
uses: boul2gom/actions/label-pr-issue@0aedeaa11b966fd08ab4d756c33ef76a1638ddac with:
token: ${{ steps.app-token.outputs.token }}
path_mappings: |
{
"src/cache/": ["cache"],
"src/download/": ["download"],
"src/events/": ["events"],
"src/extractor/": ["extractor"],
"src/metadata/": ["metadata"],
"crates/media-seek/": ["media-seek"]
}
label_definitions: |
{
"cache": {"color": "bfd4f2", "description": "Related to the cache layer"},
"download": {"color": "bfd4f2", "description": "Related to the download engine"},
"events": {"color": "bfd4f2", "description": "Related to the event system"},
"extractor": {"color": "bfd4f2", "description": "Related to video extractors"},
"metadata": {"color": "bfd4f2", "description": "Related to metadata writing"},
"media-seek": {"color": "c5def5", "description": "Related to the media-seek crate"},
"live": {"color": "bfd4f2", "description": "Related to live recording or streaming"}
}
fix-notifier:
if: github.event_name == 'push'
permissions:
contents: read
issues: write
runs-on: ubuntu-latest
name: "๐ Notify fixed issues"
steps:
- name: ๐ก๏ธ Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d with:
egress-policy: audit
- name: ๐ Generate ephemeral token from GitHub App
id: app-token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 with:
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_KEY }}
- name: ๐ Notify fixed issues
uses: boul2gom/actions/fix-notifier@0aedeaa11b966fd08ab4d756c33ef76a1638ddac with:
token: ${{ steps.app-token.outputs.token }}
manage-stale:
if: github.event_name == 'schedule'
name: "๐งน Mark stale issues and PRs"
runs-on: ubuntu-latest
steps:
- name: ๐ก๏ธ Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d with:
egress-policy: audit
- name: "๐ Generate ephemeral token from GitHub App"
id: app-token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 with:
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_KEY }}
- name: "๐งน Mark stale issues and PRs"
uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f with:
repo-token: ${{ steps.app-token.outputs.token }}
days-before-stale: 30
days-before-close: 7
stale-issue-message: |
Hi there! ๐
This issue has been inactive for 30 days. I'm marking it as `stale`.
If this is still relevant, please leave a comment. Otherwise, it will be automatically closed in 7 days. Thanks for your contribution!
close-issue-message: |
Hi there! ๐
This issue has been automatically closed due to inactivity. If it's still relevant, please feel free to reopen it or open a new one. Thanks for your contribution!
stale-pr-message: |
Hi there! ๐
This pull request has been inactive for 30 days. I'm marking it as `stale`.
If you'd like to continue working on it, just leave a comment or push a new commit. Otherwise, it will be automatically closed in 7 days. Thanks for your contribution!
close-pr-message: |
Hi there! ๐
This pull request has been automatically closed due to inactivity. If you'd like to continue working on it, please feel free to reopen it or open a new one. Thanks for your contribution!