Skip to content

Commit 7f9e197

Browse files
authored
Merge branch 'main' into dryrun_check
2 parents ec11245 + 374b299 commit 7f9e197

File tree

8 files changed

+409
-269
lines changed

8 files changed

+409
-269
lines changed

.github/workflows/stale-repos.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
# Stale Repository Identifier
3+
# This GitHub Action implements the repository activity monitoring requirements outlined in the Sovereign Cloud Stack Procedural Standard (SCS-0006).
4+
# Functionality
5+
# - Identifies repositories within the SovereignCloudStack organization that have been inactive for 335 or 365 days
6+
# - Reports stale repositories based on recent pushes, releases, and pull requests
7+
# - Automatically creates or updates a GitHub issue with the stale repository report
8+
# - Runs monthly (on the 1st at 01:00 UTC) and can be manually triggered
9+
#
10+
# Limitations
11+
# - The action does not exclude auto-generated PRs (e.g., Renovate, Dependabot)
12+
# - It does not handle repositories with no remaining codeowners as stale
13+
#
14+
# TODO: These limitations must be implemented via post-processing or contributed upstream.
15+
16+
name: stale repo identifier
17+
"on":
18+
workflow_dispatch:
19+
push:
20+
branches:
21+
- main
22+
schedule:
23+
- cron: "0 1 1 * *" # Runs monthly: at 01:00 UTC on the 1st day of every month
24+
25+
permissions:
26+
contents: read
27+
issues: write
28+
29+
jobs:
30+
build:
31+
name: Stale repo identifier
32+
runs-on: ubuntu-latest
33+
strategy:
34+
matrix:
35+
days: [335, 365]
36+
37+
permissions:
38+
contents: read
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Run stale_repos tool
44+
uses: github/[email protected]
45+
env:
46+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
ORGANIZATION: SovereignCloudStack
48+
INACTIVE_DAYS: ${{ matrix.days }}
49+
ACTIVITY_METHOD: "pushed"
50+
ADDITIONAL_METRICS: "release,pr"
51+
52+
- name: Rename report file
53+
run: mv stale_repos.md stale_repos_${{ matrix.days }}.md
54+
55+
- name: Upload stale report artifact
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: stale_repos_report_${{ matrix.days }}
59+
path: stale_repos_${{ matrix.days }}.md
60+
61+
create-issue:
62+
name: Create or update stale repo issue
63+
runs-on: ubuntu-latest
64+
needs: build # Runs after all matrix jobs finish
65+
66+
permissions:
67+
issues: write
68+
69+
steps:
70+
- uses: actions/checkout@v4
71+
72+
- name: Download all stale report artifacts
73+
uses: actions/download-artifact@v4
74+
with:
75+
path: stale_reports
76+
77+
- name: Merge reports
78+
run: |
79+
echo "# Stale Repository Report" > final_stale_repos.md
80+
for file in stale_reports/**/stale_repos_*.md; do
81+
cat "$file" >> final_stale_repos.md
82+
echo "" >> final_stale_repos.md
83+
done
84+
85+
- name: Check for the stale report issue
86+
run: |
87+
ISSUE_NUMBER=$(gh search issues "Stale repository report" --match title --json number --jq ".[0].number")
88+
echo "issue_number=$ISSUE_NUMBER" >> "$GITHUB_ENV"
89+
env:
90+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
92+
- name: Create or update issue
93+
uses: peter-evans/create-issue-from-file@v5
94+
with:
95+
issue-number: ${{ env.issue_number }}
96+
title: Stale repository report
97+
content-filepath: ./final_stale_repos.md
98+
token: ${{ secrets.GITHUB_TOKEN }}

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @org/project-board

Pipfile.lock

Lines changed: 229 additions & 223 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
milestones:
3-
- 'R2 (v3.0.0)'
4-
- 'R3 (v4.0.0)'
5-
- 'R4 (v5.0.0)'
6-
- 'R5 (v6.0.0)'
7-
- 'R6 (v7.0.0)'
8-
- 'R7 (v8.0.0)'
9-
- 'R8 (v9.0.0)'
3+
- "R2 (v3.0.0)"
4+
- "R3 (v4.0.0)"
5+
- "R4 (v5.0.0)"
6+
- "R5 (v6.0.0)"
7+
- "R6 (v7.0.0)"
8+
- "R7 (v8.0.0)"
9+
- "R8 (v9.0.0)"
10+
- "R9 (v10.0.0)"
1011

1112
labels:
1213
- name: bug
@@ -207,6 +208,9 @@ labels:
207208
- name: "kaas-hackathon"
208209
description: ""
209210
color: "0dce67"
211+
- name: "hackathon"
212+
description: ""
213+
color: "8d3ef6"
210214
# Sprint names
211215
- name: "Sprint Amsterdam"
212216
description: "Sprint Amsterdam (2023, cwk 16+17)"

0 commit comments

Comments
 (0)