From 40736f20ad29e0b391c6268f5d2c9ffecbd2abd3 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Thu, 22 Feb 2024 12:31:01 -0600 Subject: [PATCH 1/5] update create-issue-from-file handling --- .github/workflows/stale_repos.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale_repos.yml b/.github/workflows/stale_repos.yml index 13d6422..982b42d 100644 --- a/.github/workflows/stale_repos.yml +++ b/.github/workflows/stale_repos.yml @@ -19,10 +19,11 @@ jobs: EXEMPT_TOPICS: "keep,template" INACTIVE_DAYS: 365 - - name: Create issue - uses: peter-evans/create-issue-from-file@v4 + - name: Create issue from STALE_REPOS.md + uses: peter-evans/create-issue-from-file@v5 with: title: Stale repository report content-filepath: ./STALE_REPOS.md assignees: jeffpaul token: ${{ secrets.GH_PAT_REPO }} + issue-number: 33 From b457334c89d4dd1dfb34c0fd911a8d89c4cf96d5 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Thu, 22 Feb 2024 12:42:32 -0600 Subject: [PATCH 2/5] Update stale_repos.yml --- .github/workflows/stale_repos.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/stale_repos.yml b/.github/workflows/stale_repos.yml index 982b42d..44c1f11 100644 --- a/.github/workflows/stale_repos.yml +++ b/.github/workflows/stale_repos.yml @@ -10,20 +10,33 @@ jobs: name: stale repo identifier runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + steps: - name: Run stale_repos tool uses: github/stale-repos@v1 env: - GH_TOKEN: ${{ secrets.GH_PAT_REPO }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} ORGANIZATION: 10up EXEMPT_TOPICS: "keep,template" INACTIVE_DAYS: 365 + ACTIVITY_METHOD: "pushed" + + # This next step updates an existing issue. If you want a new issue every time, remove this step and remove the `issue-number: ${{ env.issue_number }}` line below. + - name: Check for the stale report issue + run: | + ISSUE_NUMBER=$(gh search issues "Stale repository report" --match title --json number --jq ".[0].number") + echo "issue_number=$ISSUE_NUMBER" >> "$GITHUB_ENV" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create issue from STALE_REPOS.md uses: peter-evans/create-issue-from-file@v5 with: + issue-number: ${{ env.issue_number }} title: Stale repository report content-filepath: ./STALE_REPOS.md assignees: jeffpaul - token: ${{ secrets.GH_PAT_REPO }} - issue-number: 33 + token: ${{ secrets.GITHUB_TOKEN }} + From 70eb39babbc6276971a7b7ec9af6dd7f1b8c9b71 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Thu, 22 Feb 2024 12:42:37 -0600 Subject: [PATCH 3/5] Create STALE_REPOS.md --- STALE_REPOS.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 STALE_REPOS.md diff --git a/STALE_REPOS.md b/STALE_REPOS.md new file mode 100644 index 0000000..eb90b30 --- /dev/null +++ b/STALE_REPOS.md @@ -0,0 +1,7 @@ +# Inactive Repositories + +The following repos have not had a push event for more than 365 days: + +| Repository URL | Days Inactive | Last Push Date | +| --- | ---: | ---: | +| https://github.com/github/.github | 5 | 2020-1-30 | \ No newline at end of file From 2ab0044cf8c86543b05985dd534b96f5bd42c347 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Thu, 22 Feb 2024 13:11:07 -0600 Subject: [PATCH 4/5] Update stale_repos.yml --- .github/workflows/stale_repos.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/stale_repos.yml b/.github/workflows/stale_repos.yml index 44c1f11..2a80b74 100644 --- a/.github/workflows/stale_repos.yml +++ b/.github/workflows/stale_repos.yml @@ -11,17 +11,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - steps: - name: Run stale_repos tool uses: github/stale-repos@v1 env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} + GH_TOKEN: ${{ secrets.GH_TOKEN_READ_PUBLIC_REPOS }} ORGANIZATION: 10up - EXEMPT_TOPICS: "keep,template" INACTIVE_DAYS: 365 - ACTIVITY_METHOD: "pushed" + ACTIVITY_METHOD: "default_branch_updated" # This next step updates an existing issue. If you want a new issue every time, remove this step and remove the `issue-number: ${{ env.issue_number }}` line below. - name: Check for the stale report issue From fd1f52cacc3386519e07baf94f1b887538c4f640 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Thu, 22 Feb 2024 15:45:02 -0600 Subject: [PATCH 5/5] Update .github/workflows/stale_repos.yml Co-authored-by: Darin Kotter --- .github/workflows/stale_repos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale_repos.yml b/.github/workflows/stale_repos.yml index 2a80b74..b062431 100644 --- a/.github/workflows/stale_repos.yml +++ b/.github/workflows/stale_repos.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run stale_repos tool uses: github/stale-repos@v1