stale icon indicating copy to clipboard operation
stale copied to clipboard

How to run for other repos in the same organization

Open sumire88 opened this issue 1 year ago • 3 comments

Description:

Hi, I wonder how we may run this action for multiple repositories.

[!NOTE] I use GitHub App for OAuth, already granted the app permission to pull_request and issue

Justification:

My current setup is as follows:

name: Check stale status

on:
  schedule:
    - cron: "0 0 * * *" # UTC 00:00 every day

env:
  repositories: "automation-hub"
  days-before-stale: 14

jobs:
  checker:
    runs-on: ubuntu-latest
    steps:
      - name: Generate an installation token
        id: generate_token
        uses: actions/create-github-app-token@v1
        env:
          GITHUB_TOKEN: ${{ github.token }}
        with:
          app-id: ${{ secrets.STALE_BOT_APP_ID }}
          private-key: ${{ secrets.STALE_BOT_APP_PRIVATE_KEY }}
          owner: ${{ github.repository_owner }}
          repositories: ${{ env.repositories }}

      - uses: actions/stale@main
        with:
          repo-token: ${{ steps.generate_token.outputs.token }}
          stale-issue-message: "This issue is stale because it has been open ${{ env.days-before-stale }} days with no activity. Don't be panic, it will still be open until somebody explictly closes it."
          stale-pr-message: "This issue is stale because it has been open ${{ env.days-before-stale }} days with no activity. Don't be panic, it will still be open until somebody explictly closes it."
          stale-issue-label: stale
          stale-pr-label: stale
          exempt-pr-labels: "triage/accepted"
          exempt-issue-labels: "triage/awaiting-approval,triage/in-progress"
          exempt-all-issue-assignees: true
          days-before-stale: ${{ env.days-before-stale }}
          days-before-close: -1
          days-before-pr-close: -1
          start-date: "2024-01-01T00:00:00Z" # ISO 8601 or RFC 2822

The idea is to run this action for N repos based on a cron schedule.

Are you willing to submit a PR?

NA.

sumire88 avatar Jan 10 '24 15:01 sumire88

Hello @sumire88 Thank you for creating this feature request. We will investigate it and come back to you as soon as we have some feedback.

HarithaVattikuti avatar Jan 10 '24 18:01 HarithaVattikuti

Hello @sumire88 Thank you for creating this feature request. We will investigate it and come back to you as soon as we have some feedback.

Thanks for the positive response. Appreciate it.

sumire88 avatar Jan 11 '24 12:01 sumire88

Thank you for creating this feature request. We will investigate it and come back to you as soon as we have some feedback.

@HarithaVattikuti - any update on this?

rocklan avatar Mar 19 '24 00:03 rocklan