Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run for other repos in the same organization #1128

Open
sumire88 opened this issue Jan 10, 2024 · 3 comments
Open

How to run for other repos in the same organization #1128

sumire88 opened this issue Jan 10, 2024 · 3 comments
Labels
feature request New feature or request to improve the current logic

Comments

@sumire88
Copy link

sumire88 commented Jan 10, 2024

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 sumire88 added feature request New feature or request to improve the current logic needs triage labels Jan 10, 2024
@HarithaVattikuti
Copy link
Contributor

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.

@sumire88
Copy link
Author

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.

@rocklan
Copy link

rocklan commented Mar 19, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

3 participants