name: 'Mark stale issues'
on:
  schedule:
    - cron: '30 1 * * *'

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v3
        with:
          stale-issue-message: >
            This issue is marked as stale as it has had no activity in the past
            30 days. Please close this issue if no further response or action is
            needed. Otherwise, please respond with any updates and confirm that
            this issue still needs to be addressed.
          stale-issue-label: 'stale'
          any-of-labels: 'question,needtriage,more info needed'
          days-before-issue-stale: 30
          days-before-issue-close: -1

name: 'Mark stale issues'
on:
  schedule:
    - cron: '30 1 * * *'

permissions:
  contents: read

jobs:
  stale:
    permissions:
      issues: write  # for actions/stale to close stale issues
      pull-requests: write  # for actions/stale to close stale PRs
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v3
        with:
          stale-issue-message: >
            This issue is marked as stale as it has had no activity in the past
            30 days. Please close this issue if no further response or action is
            needed. Otherwise, please respond with any updates and confirm that
            this issue still needs to be addressed.
          stale-issue-label: 'stale'
          any-of-labels: 'question,needtriage,more info needed'
          days-before-issue-stale: 30
          days-before-issue-close: -1

Set permissions for GitHub actions
chore: Set permissions for GitHub actions

 Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <3ee6d032cf0e2168c09d055a780f32b07cd47cf5@users.noreply.github.com>
