yt-dlp 2.7.2

๐ŸŽฌ๏ธ A Rust library (with auto dependencies installation) for Youtube downloading
Documentation
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 # v2.16.1
        with:
          egress-policy: audit

      - name: ๐Ÿ” Generate ephemeral token from GitHub App
        id: app-token
        uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
        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 # v1.0.2
        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 # v2.16.1
        with:
          egress-policy: audit

      - name: ๐Ÿ” Generate ephemeral token from GitHub App
        id: app-token
        uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
        with:
          app-id: ${{ secrets.CI_APP_ID }}
          private-key: ${{ secrets.CI_APP_KEY }}

      - name: ๐Ÿ› Notify fixed issues
        uses: boul2gom/actions/fix-notifier@0aedeaa11b966fd08ab4d756c33ef76a1638ddac # v1.0.2
        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 # v2.16.1
        with:
          egress-policy: audit

      - name: "๐Ÿ” Generate ephemeral token from GitHub App"
        id: app-token
        uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
        with:
          app-id: ${{ secrets.CI_APP_ID }}
          private-key: ${{ secrets.CI_APP_KEY }}

      - name: "๐Ÿงน Mark stale issues and PRs"
        uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
        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!