Stale PR Management #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Stale PR Management | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| manage-stale-prs-python: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate GitHub App token | |
| id: generate-token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ secrets.OPENWISP_BOT_APP_ID }} | |
| private-key: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }} | |
| - name: Checkout openwisp-utils bot branch | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Eeshu-Yadav/openwisp-utils | |
| ref: issues/571-automate-assigning-unassigning-issues | |
| sparse-checkout: | | |
| .github/actions/bot-autoassign | |
| sparse-checkout-cone-mode: false | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install "PyGithub>=2.0.0" | |
| - name: Run stale PR bot | |
| env: | |
| GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | |
| REPOSITORY: ${{ github.repository }} | |
| run: python .github/actions/bot-autoassign/__main__.py stale_pr |