From ca4be6f0669b77bef10a0d702431637ad5d529e5 Mon Sep 17 00:00:00 2001 From: xstoicunicornx Date: Tue, 29 Sep 2026 20:31:19 +0000 Subject: [PATCH 1/3] Fix check-in issue filtering --- .github/scripts/standup_lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/standup_lib.py b/.github/scripts/standup_lib.py index a511f91fe..c727bebb1 100644 --- a/.github/scripts/standup_lib.py +++ b/.github/scripts/standup_lib.py @@ -212,8 +212,8 @@ def gather_activity(user, since_date): seen_ids.add(pr["id"]) reviewed_prs.append(pr) - # Issues opened - issues_opened = search_issues(f"author:{user} type:issue created:>{since}") + # Issues opened. is:issue excludes pull requests from GraphQL search results. + issues_opened = search_issues(f"author:{user} is:issue created:>{since}") return merged_prs, reviewed_prs, issues_opened From 4f3708f0fbb2d7790658fcd94dc5152fe7612def Mon Sep 17 00:00:00 2001 From: xstoicunicornx Date: Tue, 29 Sep 2026 20:34:14 +0000 Subject: [PATCH 2/3] Add opened PRs to check-ins --- .github/scripts/create_standup_discussion.py | 5 ++++- .github/scripts/respond_to_standup_comment.py | 3 ++- .github/scripts/standup_lib.py | 14 ++++++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/scripts/create_standup_discussion.py b/.github/scripts/create_standup_discussion.py index ff2420160..d9ca02287 100644 --- a/.github/scripts/create_standup_discussion.py +++ b/.github/scripts/create_standup_discussion.py @@ -161,11 +161,14 @@ def main(): # Gather all comments first comments = [] for user in CONTRIBUTORS: - merged_prs, reviewed_prs, issues_opened = gather_activity(user, since_date) + merged_prs, opened_prs, reviewed_prs, issues_opened = gather_activity( + user, since_date + ) bottlenecks = gather_potential_bottlenecks(user, since_date) comment_body = format_contributor_comment( user, merged_prs, + opened_prs, reviewed_prs, issues_opened, bottlenecks, diff --git a/.github/scripts/respond_to_standup_comment.py b/.github/scripts/respond_to_standup_comment.py index d659a0888..ec8c5a823 100644 --- a/.github/scripts/respond_to_standup_comment.py +++ b/.github/scripts/respond_to_standup_comment.py @@ -113,13 +113,14 @@ def main(): since_date = parse_github_datetime(discussion_created_at) - timedelta(days=7) try: - merged_prs, reviewed_prs, issues_opened = gather_activity( + merged_prs, opened_prs, reviewed_prs, issues_opened = gather_activity( comment_author, since_date ) bottlenecks = gather_potential_bottlenecks(comment_author, since_date) body = format_contributor_comment( comment_author, merged_prs, + opened_prs, reviewed_prs, issues_opened, bottlenecks, diff --git a/.github/scripts/standup_lib.py b/.github/scripts/standup_lib.py index c727bebb1..48dfcbaac 100644 --- a/.github/scripts/standup_lib.py +++ b/.github/scripts/standup_lib.py @@ -197,6 +197,9 @@ def gather_activity(user, since_date): # PRs merged (authored) merged_prs = search_issues(f"author:{user} type:pr merged:>{since}") + # PRs opened + opened_prs = search_issues(f"author:{user} is:pr created:>{since}") + # PRs reviewed use search to find candidate PRs then confirm # the reviewer actually submitted a review during the standup window. review_candidates = search_issues( @@ -215,7 +218,7 @@ def gather_activity(user, since_date): # Issues opened. is:issue excludes pull requests from GraphQL search results. issues_opened = search_issues(f"author:{user} is:issue created:>{since}") - return merged_prs, reviewed_prs, issues_opened + return merged_prs, opened_prs, reviewed_prs, issues_opened def gather_potential_bottlenecks(user, since_date): @@ -245,6 +248,7 @@ def gather_potential_bottlenecks(user, since_date): def format_contributor_comment( user, merged_prs, + opened_prs, reviewed_prs, issues_opened, bottlenecks, @@ -265,13 +269,19 @@ def format_contributor_comment( # SHIPPED section lines.append("### Shipped") - if merged_prs or reviewed_prs or issues_opened: + if merged_prs or opened_prs or reviewed_prs or issues_opened: if merged_prs: lines.append("") lines.append("**PRs merged:**") for pr in merged_prs: lines.append(f"- [{pr['title']}]({pr['html_url']})") + if opened_prs: + lines.append("") + lines.append("**PRs opened:**") + for pr in opened_prs: + lines.append(f"- [{pr['title']}]({pr['html_url']})") + if reviewed_prs: lines.append("") lines.append("**PRs reviewed:**") From f9fd13fbd0a6f9ebec4a53c1eff3781617c3e49c Mon Sep 17 00:00:00 2001 From: xstoicunicornx Date: Wed, 30 Sep 2026 17:41:09 +0000 Subject: [PATCH 3/3] Add check-in dry run --- .github/scripts/respond_to_standup_comment.py | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/scripts/respond_to_standup_comment.py b/.github/scripts/respond_to_standup_comment.py index ec8c5a823..97289e1de 100644 --- a/.github/scripts/respond_to_standup_comment.py +++ b/.github/scripts/respond_to_standup_comment.py @@ -5,6 +5,22 @@ `discussion_comment` events. The workflow's `if:` block already filters to the Check-ins category and `Weekly Check-in:` titles; this script does the precise regex match and the per-week cap. + +Local dry run: + + DRY_RUN=1 \ + COMMENT_ID=dry-run \ + COMMENT_BODY=/check-in \ + COMMENT_AUTHOR="$(uv run --no-project python -c \ + 'import sys; sys.stderr.write("GitHub username: "); print(input())')" \ + DISCUSSION_CREATED_AT="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \ + DISCUSSION_ID=dry-run \ + GITHUB_REPOSITORY=payjoin/rust-payjoin \ + BOT_LOGIN=payjoin-robot \ + STANDUP_TOKEN="$(uv run --no-project python -c \ + 'from getpass import getpass; print(getpass("GitHub token: "))')" \ + uv run --with requests \ + python .github/scripts/respond_to_standup_comment.py """ import os @@ -24,6 +40,7 @@ TRIGGER_RE = re.compile(r"(?im)(^|\s)/check-in\b") SUCCESS_MARKER = "### Shipped" ERROR_BODY = "_Bot couldn't gather activity right now. Try again in a few minutes._" +DRY_RUN = os.environ.get("DRY_RUN") def has_prior_success(discussion_id, author): @@ -66,6 +83,9 @@ def has_prior_success(discussion_id, author): def post_reply(discussion_id, reply_to_id, body): """Post a threaded reply via GraphQL ``addDiscussionComment``.""" + if DRY_RUN: + print(body) + return graphql( """ mutation($discussionId: ID!, $replyToId: ID!, $body: String!) { @@ -103,7 +123,7 @@ def main(): print("Loop guard: comment author is the bot; exiting.") return - if has_prior_success(discussion_id, comment_author): + if not DRY_RUN and has_prior_success(discussion_id, comment_author): print( f"Per-week cap: {comment_author} already received a successful " "summary in this Discussion; exiting."