Skip to content

Commit 2714a1f

Browse files
committed
Add stale repos action
Signed-off-by: Matej Feder <[email protected]>
1 parent 385d5e3 commit 2714a1f

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

.github/workflows/inactive-users.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: inactive user identifier
3+
4+
"on":
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
- get_stale # for testing only - remove!
10+
schedule:
11+
- cron: "3 2 1 * *"
12+
13+
permissions:
14+
contents: read
15+
issues: write
16+
17+
jobs:
18+
build:
19+
name: inactive user identifier
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Analyze User Activity
24+
uses: peter-murray/inactive-users-action@v1
25+
with:
26+
token: ${{ secrets.GHP_MFEDER }}
27+
organization: SovereignCloudStack
28+
activity_days: 365
29+
30+
- name: Save User Activity Report
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: reports
34+
path: report_csv

.github/workflows/stale-repos.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: stale repo identifier
3+
4+
"on":
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
- get_stale # for testing only - remove!
10+
schedule:
11+
- cron: "3 2 1 * *"
12+
13+
permissions:
14+
contents: read
15+
issues: write
16+
17+
jobs:
18+
build:
19+
name: stale repo identifier
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Run stale_repos tool
26+
uses: github/[email protected]
27+
env:
28+
GH_TOKEN: ${{ secrets.GHP_MFEDER }}
29+
ORGANIZATION: SovereignCloudStack
30+
INACTIVE_DAYS: 365
31+
ACTIVITY_METHOD: "pushed"
32+
ADDITIONAL_METRICS: "release,pr"
33+
34+
# 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.
35+
- name: Check for the stale report issue
36+
run: |
37+
ISSUE_NUMBER=$(gh search issues "Stale repository report" --match title --json number --jq ".[0].number")
38+
echo "issue_number=$ISSUE_NUMBER" >> "$GITHUB_ENV"
39+
env:
40+
GH_TOKEN: ${{ secrets.GHP_MFEDER }}
41+
42+
- name: Create issue
43+
uses: peter-evans/create-issue-from-file@v5
44+
with:
45+
issue-number: ${{ env.issue_number }}
46+
title: Stale repository report
47+
content-filepath: ./stale_repos.md
48+
token: ${{ secrets.GHP_MFEDER }}

0 commit comments

Comments
 (0)