Skip to content

Commit 73a60ee

Browse files
committed
Track libs-team ACP age and activity
also adds the ability to track issues instead of just prs
1 parent 8ad6c89 commit 73a60ee

File tree

5 files changed

+17
-1
lines changed

5 files changed

+17
-1
lines changed

Diff for: ci.sh

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ git checkout "${GIT_BRANCH}"
4747
python3 updater.py rust-lang/rust
4848
python3 updater.py rust-lang/crates.io
4949
python3 updater.py rust-lang/rust-clippy
50+
python3 updater.py rust-lang/libs-team
5051

5152

5253
if git diff --quiet data/; then

Diff for: data/rust-lang/libs-team/issue-acp-activity.csv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
is:open label:api-change-proposal updated:{{param|relative_date}},>1|today,3..1|last 3 days,7..4|last week,14..8|last 2 weeks,30..15|last month,90..31|last 3 months,180..91|last 6 months,<180|more than 6 months
2+
2023-01-30,3,1,4,3,3,19,30,11

Diff for: data/rust-lang/libs-team/issue-acp-age.csv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
is:open label:api-change-proposal created:{{param|relative_date}},>1|today,3..1|last 3 days,7..4|last week,14..8|last 2 weeks,30..15|last month,90..31|last 3 months,180..91|last 6 months,<180|more than 6 months
2+
2023-01-30,1,0,2,2,3,16,34,20

Diff for: libs-team.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: libs team
3+
repo: rust-lang/libs-team
4+
graphs:
5+
issue-acp-activity: Last activity on ACPs
6+
issue-acp-age: ACP creation dates
7+
layout: graphs
8+
---

Diff for: updater.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020
# SOFTWARE.
2121

22+
from pathlib import Path
2223
import csv
2324
import datetime
2425
import json
@@ -67,7 +68,7 @@ def get_issues_count(http_session, repo, jinja_env, query, param):
6768
param = param.split("|")[0]
6869

6970
query_tmpl = jinja_env.from_string(query)
70-
query = "is:pr repo:{repo} {query}".format(
71+
query = "repo:{repo} {query}".format(
7172
repo=repo,
7273
query=query_tmpl.render(param=param),
7374
)
@@ -110,7 +111,9 @@ def update_csv_file(http_session, repo, path):
110111
jinja_env = jinja2.Environment()
111112
jinja_env.filters["relative_date"] = filter_relative_date
112113

114+
issue_type = Path(path).name.split("-", 1)[0]
113115
query = content[0][0]
116+
query = f"is:{issue_type} {query}"
114117
for param in content[0][1:]:
115118
content[1].append(str(get_issues_count(http_session, repo, jinja_env, query, param)))
116119

0 commit comments

Comments
 (0)