Skip to content

Commit 18d3bb8

Browse files
new devs and workflow consolidation (#2797)
1 parent 93b92e3 commit 18d3bb8

7 files changed

+181
-127
lines changed

.github/utilities/generate_developer_tables.py

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
generate_authors_table.py
1212
"""
1313

14+
import os
1415
import sys
1516
import time
1617
from os import path
@@ -19,7 +20,7 @@
1920
import requests
2021

2122
LOGO_URL = "https://avatars2.githubusercontent.com/u/78909809"
22-
REPO_FOLDER = Path(path.abspath(__file__)).parent.parent
23+
REPO_FOLDER = Path(path.abspath(__file__)).parent.parent.parent
2324

2425

2526
def get(url, auth):
@@ -53,12 +54,14 @@ def get_contributors(auth):
5354
iw_slug = "aeon-infrastructure-workgroup"
5455
rmw = []
5556
rmw_slug = "aeon-release-management-workgroup"
57+
sd = []
58+
sd_slug = "aeon-supporting-developers"
5659

5760
entry_point = "https://api.github.com/orgs/aeon-toolkit/"
5861

5962
for team_slug, lst in zip(
60-
(cocw_slug, cw_slug, cd_slug, fw_slug, iw_slug, rmw_slug),
61-
(cocw, cw, cd, fw, iw, rmw),
63+
(cocw_slug, cw_slug, cd_slug, fw_slug, iw_slug, rmw_slug, sd_slug),
64+
(cocw, cw, cd, fw, iw, rmw, sd),
6265
):
6366
for page in range(5): # 5 pages, 30 per page
6467
reply = get(f"{entry_point}teams/{team_slug}/members?page={page}", auth)
@@ -71,6 +74,7 @@ def get_contributors(auth):
7174
fw = {c["login"] for c in fw}
7275
iw = {c["login"] for c in iw}
7376
rmw = {c["login"] for c in rmw}
77+
sd = {c["login"] for c in sd}
7478

7579
# get profiles from GitHub
7680
cocw = [get_profile(login, auth) for login in cocw]
@@ -79,6 +83,7 @@ def get_contributors(auth):
7983
fw = [get_profile(login, auth) for login in fw]
8084
iw = [get_profile(login, auth) for login in iw]
8185
rmw = [get_profile(login, auth) for login in rmw]
86+
sd = [get_profile(login, auth) for login in sd]
8287

8388
# sort by last name
8489
cocw = sorted(cocw, key=key)
@@ -87,6 +92,7 @@ def get_contributors(auth):
8792
fw = sorted(fw, key=key)
8893
iw = sorted(iw, key=key)
8994
rmw = sorted(rmw, key=key)
95+
sd = sorted(sd, key=key)
9096

9197
return (
9298
cocw,
@@ -95,6 +101,7 @@ def get_contributors(auth):
95101
fw,
96102
iw,
97103
rmw,
104+
sd,
98105
)
99106

100107

@@ -140,9 +147,11 @@ def generate_table(contributors):
140147

141148

142149
if __name__ == "__main__":
143-
print("access token:", file=sys.stderr) # noqa: T201
144-
token = input()
145-
auth = ("user", token)
150+
auth = os.getenv("GITHUB_TOKEN")
151+
if auth is None:
152+
print("access token:", file=sys.stderr) # noqa: T201
153+
token = input()
154+
auth = ("user", token)
146155

147156
(
148157
cocw,
@@ -151,6 +160,7 @@ def generate_table(contributors):
151160
fw,
152161
iw,
153162
rmw,
163+
sd,
154164
) = get_contributors(auth)
155165

156166
with open(
@@ -190,3 +200,10 @@ def generate_table(contributors):
190200
encoding="utf-8",
191201
) as rst_file:
192202
rst_file.write(generate_table(rmw))
203+
204+
with open(
205+
REPO_FOLDER / "docs" / "about" / "supporting_developers.md",
206+
"w+",
207+
encoding="utf-8",
208+
) as rst_file:
209+
rst_file.write(generate_table(sd))

.github/workflows/periodic_github_maintenace.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/precommit_autoupdate.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/scorecard.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
name: Weekly GitHub Maintenance
2+
3+
on:
4+
schedule:
5+
# every Monday at 12:30 AM UTC
6+
- cron: "30 0 * * 1"
7+
workflow_dispatch:
8+
9+
jobs:
10+
pre-commit-auto-update:
11+
runs-on: ubuntu-24.04
12+
13+
steps:
14+
- name: Checkout main
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Python 3.11
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.11"
21+
22+
- uses: browniebroke/[email protected]
23+
24+
- if: always()
25+
name: Create app token
26+
uses: actions/create-github-app-token@v2
27+
id: app-token
28+
with:
29+
app-id: ${{ vars.PR_APP_ID }}
30+
private-key: ${{ secrets.PR_APP_KEY }}
31+
32+
- if: always()
33+
uses: peter-evans/create-pull-request@v7
34+
with:
35+
token: ${{ steps.app-token.outputs.token }}
36+
commit-message: "Automated `pre-commit` hook update"
37+
branch: pre-commit-hooks-update
38+
title: "[MNT] Automated `pre-commit` hook update"
39+
body: "Automated weekly update to `.pre-commit-config.yaml` hook versions."
40+
labels: maintenance, full pre-commit, no changelog
41+
42+
teams-table-auto-update:
43+
runs-on: ubuntu-24.04
44+
45+
steps:
46+
- name: Checkout main
47+
uses: actions/checkout@v4
48+
with:
49+
sparse-checkout: .github/utilities
50+
51+
- name: Setup Python 3.11
52+
uses: actions/setup-python@v5
53+
with:
54+
python-version: "3.11"
55+
56+
- name: Create app token
57+
uses: actions/create-github-app-token@v2
58+
id: app-token
59+
with:
60+
app-id: ${{ vars.PR_APP_ID }}
61+
private-key: ${{ secrets.PR_APP_KEY }}
62+
63+
- name: Process comment edit
64+
id: label_out
65+
run: python .github/utilities/generate_developer_tables.py
66+
env:
67+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
68+
69+
- uses: peter-evans/create-pull-request@v7
70+
with:
71+
token: ${{ steps.app-token.outputs.token }}
72+
commit-message: "Automated teams tables update"
73+
branch: webpage-teams-update
74+
title: "[DOC] Automated website teams tables update"
75+
body: "Automated weekly update to the website teams tables."
76+
labels: documentation, no changelog
77+
78+
github-security-scorecard:
79+
name: Scorecard analysis
80+
runs-on: ubuntu-24.04
81+
permissions:
82+
# Needed to upload the results to code-scanning dashboard.
83+
security-events: write
84+
# Needed to publish results and get a badge (see publish_results below).
85+
id-token: write
86+
87+
steps:
88+
- name: Checkout code
89+
uses: actions/checkout@v4
90+
with:
91+
persist-credentials: false
92+
93+
- name: Run analysis
94+
uses: ossf/[email protected]
95+
with:
96+
results_file: results.sarif
97+
results_format: sarif
98+
publish_results: true
99+
100+
- name: Upload artifact
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: SARIF file
104+
path: results.sarif
105+
retention-days: 5
106+
107+
- name: Upload to code-scanning
108+
uses: github/codeql-action/upload-sarif@v3
109+
with:
110+
sarif_file: results.sarif
111+
112+
stale_branches:
113+
runs-on: ubuntu-24.04
114+
115+
steps:
116+
- name: Create app token
117+
uses: actions/create-github-app-token@v2
118+
id: app-token
119+
with:
120+
app-id: ${{ vars.PR_APP_ID }}
121+
private-key: ${{ secrets.PR_APP_KEY }}
122+
123+
- name: Stale Branches
124+
uses: crs-k/[email protected]
125+
with:
126+
repo-token: ${{ steps.app-token.outputs.token }}
127+
days-before-stale: 180
128+
days-before-delete: 210
129+
comment-updates: true
130+
tag-committer: true
131+
stale-branch-label: "stale branch"
132+
compare-branches: "info"
133+
pr-check: true

docs/about.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,18 @@ The release management workgroup is responsible for managing the project's relea
4242
```{include} about/release_management_workgroup.md
4343
```
4444

45+
### Supporting Developers
46+
47+
Supporting developers have been provided write access to the main repository to aid
48+
with package contributions and maintenance.
49+
50+
```{include} about/supporting_developers.md
51+
```
52+
4553
### Core Developers
4654

47-
The core developers push forward `aeon`'s development and maintain the package.
55+
Core developers push forward `aeon`'s development, maintain the package and build
56+
our community.
4857

4958
```{include} about/core_developers.md
5059
```

docs/about/supporting_developers.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- Generated by generate_developer_table.py -->
2+
<div class='aeon-teams-container'>
3+
<div>
4+
<a href='https://github.com/LinGinQiu'><img src='https://avatars.githubusercontent.com/u/80885865?v=4' class='avatar' /></a> <br />
5+
<p><a href='https://github.com/LinGinQiu'>Chuanhang Qiu </a></p>
6+
</div>
7+
<div>
8+
<a href='https://github.com/alexbanwell1'><img src='https://avatars.githubusercontent.com/u/31886108?v=4' class='avatar' /></a> <br />
9+
<p><a href='https://github.com/alexbanwell1'>alexbanwell1</a></p>
10+
</div>
11+
<div>
12+
<a href='https://github.com/pattplatt'><img src='https://avatars.githubusercontent.com/u/55019140?v=4' class='avatar' /></a> <br />
13+
<p><a href='https://github.com/pattplatt'>Patrick</a></p>
14+
</div>
15+
</div>

0 commit comments

Comments
 (0)