diff --git a/Dockerfile b/Dockerfile index b01f047..84cef62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.13-slim@sha256:60248ff36cf701fcb6729c085a879d81e4603f7f507345742dc82d4b38d16784 +FROM python:3.13-slim@sha256:914bf5c12ea40a97a78b2bff97fbdb766cc36ec903bfb4358faf2b74d73b555b LABEL com.github.actions.name="stale-repos" \ com.github.actions.description="Find stale repositories in a GitHub organization." \ com.github.actions.icon="check-square" \ diff --git a/README.md b/README.md index 77b42a1..0be2049 100644 --- a/README.md +++ b/README.md @@ -94,10 +94,10 @@ jobs: issues: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run stale_repos tool - uses: github/stale-repos@v1 + uses: github/stale-repos@v2 env: GH_TOKEN: ${{ secrets.GH_TOKEN }} ORGANIZATION: ${{ secrets.ORGANIZATION }} @@ -109,7 +109,7 @@ jobs: # 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") + 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 }} @@ -118,7 +118,7 @@ jobs: uses: peter-evans/create-issue-from-file@v5 with: issue-number: ${{ env.issue_number }} - title: Stale repository report + title: Stale-repository-report content-filepath: ./stale_repos.md assignees: token: ${{ secrets.GITHUB_TOKEN }} @@ -161,7 +161,7 @@ jobs: steps: - name: Run stale_repos tool id: stale-repos - uses: github/stale-repos@v1 + uses: github/stale-repos@v2 env: GH_TOKEN: ${{ secrets.GH_TOKEN }} ORGANIZATION: ${{ secrets.ORGANIZATION }} @@ -210,7 +210,7 @@ jobs: org: [org1, org2] steps: - name: "run stale-repos" - uses: github/stale-repos@v1 + uses: github/stale-repos@v2 env: GH_TOKEN: ${{ secrets.GH_TOKEN }} ORGANIZATION: ${{ matrix.org }} @@ -237,10 +237,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run stale_repos tool - uses: github/stale-repos@v1 + uses: github/stale-repos@v2 env: GH_APP_ID: ${{ secrets.GH_APP_ID }} GH_APP_INSTALLATION_ID: ${{ secrets.GH_APP_INSTALLATION_ID }} diff --git a/stale_repos.py b/stale_repos.py index 61f8c05..ccf1967 100755 --- a/stale_repos.py +++ b/stale_repos.py @@ -386,7 +386,7 @@ def set_repo_data( Potentially caused by ghost user." ) - print(f"{repo.html_url}: {days_inactive} days inactive") # type: ignore + print(f"{repo.html_url} {days_inactive} days inactive") # type: ignore return repo_data diff --git a/test_stale_repos.py b/test_stale_repos.py index 3e7c41d..9e470be 100644 --- a/test_stale_repos.py +++ b/test_stale_repos.py @@ -209,7 +209,7 @@ def test_get_inactive_repos_with_exempt_topics(self): expected_output = ( f"Exempt topics: ['topic1', 'topic2']\n" f"https://github.com/example/repo is exempt from stale repo check\n" - f"https://github.com/example/repo2: 30 days inactive\n" + f"https://github.com/example/repo2 30 days inactive\n" f"Found 1 stale repos in {organization}\n" ) self.assertEqual(expected_output, output)