From 7d15228c8b69ce26a29b271fd6c38087021e1f31 Mon Sep 17 00:00:00 2001 From: Akshat Kumar Date: Sun, 7 Dec 2025 13:31:58 +0530 Subject: [PATCH 01/10] chore: test PR for inactivity phase 2 Signed-off-by: Akshat Kumar --- .../dry_run_inactivity_unassign_phase2.sh | 145 ++++++++++++++++ .github/scripts/inactivity_unassign_phase2.sh | 158 ++++++++++++++++++ .../bot-inactivity-unassign-phase1.yml | 12 +- .../bot-inactivity-unassign-phase2.yml | 29 ++++ test-phase2.txt | 1 + 5 files changed, 343 insertions(+), 2 deletions(-) create mode 100755 .github/scripts/dry_run_inactivity_unassign_phase2.sh create mode 100755 .github/scripts/inactivity_unassign_phase2.sh create mode 100644 .github/workflows/bot-inactivity-unassign-phase2.yml create mode 100644 test-phase2.txt diff --git a/.github/scripts/dry_run_inactivity_unassign_phase2.sh b/.github/scripts/dry_run_inactivity_unassign_phase2.sh new file mode 100755 index 000000000..e34042323 --- /dev/null +++ b/.github/scripts/dry_run_inactivity_unassign_phase2.sh @@ -0,0 +1,145 @@ +#!/usr/bin/env bash +set -euo pipefail + +# DRY-RUN: Phase 2 Inactivity Unassign Bot +# - Does NOT change anything +# - Logs which PRs/issues WOULD be affected + +REPO="${REPO:-}" +DAYS="${DAYS:-21}" + +if [ -z "$REPO" ]; then + echo "ERROR: REPO environment variable not set." + echo "Example: export REPO=owner/repo" + exit 1 +fi + +echo "------------------------------------------------------------" +echo " DRY RUN: Phase 2 Inactivity Unassign (PR inactivity)" +echo " Repo: $REPO" +echo " Threshold: $DAYS days (no commit activity on PR)" +echo "------------------------------------------------------------" + +NOW_TS=$(date +%s) + +parse_ts() { + local ts="$1" + if date --version >/dev/null 2>&1; then + date -d "$ts" +%s + else + date -j -f "%Y-%m-%dT%H:%M:%SZ" "$ts" +"%s" + fi +} + +declare -a SUMMARY=() + +ISSUES=$(gh api "repos/$REPO/issues" \ + --paginate \ + --jq '.[] | select(.state=="open" and (.assignees | length > 0) and (.pull_request | not)) | .number') + +if [ -z "$ISSUES" ]; then + echo "No open issues with assignees found." + exit 0 +fi + +echo "[INFO] Found issues: $ISSUES" +echo + +for ISSUE in $ISSUES; do + echo "============================================================" + echo " ISSUE #$ISSUE" + echo "============================================================" + + ISSUE_JSON=$(gh api "repos/$REPO/issues/$ISSUE") + ASSIGNEES=$(echo "$ISSUE_JSON" | jq -r '.assignees[].login') + + if [ -z "$ASSIGNEES" ]; then + echo "[INFO] No assignees? Skipping." + echo + continue + fi + + echo "[INFO] Assignees: $ASSIGNEES" + echo + + for USER in $ASSIGNEES; do + echo " → Checking assignee: $USER" + + PR_NUMBERS=$(gh api \ + -H "Accept: application/vnd.github.mockingbird-preview+json" \ + "repos/$REPO/issues/$ISSUE/timeline" \ + --jq ".[] + | select(.event == \"cross-referenced\") + | select(.source.issue.pull_request != null) + | select(.source.issue.user.login == \"$USER\") + | .source.issue.number") + + if [ -z "$PR_NUMBERS" ]; then + echo " [INFO] No linked PRs by $USER for this issue." + echo + continue + fi + + echo " [INFO] Linked PRs by $USER: $PR_NUMBERS" + + STALE_PR="" + STALE_AGE_DAYS=0 + + for PR_NUM in $PR_NUMBERS; do + PR_STATE=$(gh pr view "$PR_NUM" --repo "$REPO" --json state --jq '.state') + + if [ "$PR_STATE" != "OPEN" ]; then + echo " [SKIP] PR #$PR_NUM is not open ($PR_STATE)." + continue + fi + + LAST_COMMIT_DATE=$(gh api "repos/$REPO/pulls/$PR_NUM/commits" \ + --jq '.[-1].commit.committer.date // .[-1].commit.author.date' 2>/dev/null || echo "") + + if [ -z "$LAST_COMMIT_DATE" ]; then + echo " [WARN] Could not determine last commit date for PR #$PR_NUM, skipping." + continue + fi + + LAST_COMMIT_TS=$(parse_ts "$LAST_COMMIT_DATE") + AGE_DAYS=$(( (NOW_TS - LAST_COMMIT_TS) / 86400 )) + + echo " [INFO] PR #$PR_NUM last commit: $LAST_COMMIT_DATE (~${AGE_DAYS} days ago)" + + if [ "$AGE_DAYS" -ge "$DAYS" ]; then + STALE_PR="$PR_NUM" + STALE_AGE_DAYS="$AGE_DAYS" + break + fi + done + + if [ -z "$STALE_PR" ]; then + echo " [KEEP] No OPEN PR for $USER is stale (>= $DAYS days)." + echo + continue + fi + + echo " [DRY RUN] Would CLOSE PR #$STALE_PR (no commits for $STALE_AGE_DAYS days)" + echo " [DRY RUN] Would UNASSIGN @$USER from issue #$ISSUE" + echo + + SUMMARY+=("Issue #$ISSUE → user @$USER → stale PR #$STALE_PR (no commits for $STALE_AGE_DAYS days)") + done + + echo +done + +if [ ${#SUMMARY[@]} -gt 0 ]; then + echo "============================================================" + echo " SUMMARY: Actions that WOULD be taken (no changes made)" + echo "============================================================" + for ITEM in "${SUMMARY[@]}"; do + echo " - $ITEM" + done +else + echo "No stale PRs / unassignments detected in this dry-run." +fi + +echo "------------------------------------------------------------" +echo " DRY RUN COMPLETE — No changes were made." +echo "------------------------------------------------------------" diff --git a/.github/scripts/inactivity_unassign_phase2.sh b/.github/scripts/inactivity_unassign_phase2.sh new file mode 100755 index 000000000..da14dbddc --- /dev/null +++ b/.github/scripts/inactivity_unassign_phase2.sh @@ -0,0 +1,158 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Env: +# GH_TOKEN - provided by GitHub Actions +# REPO - owner/repo (fallback to GITHUB_REPOSITORY) +# DAYS - inactivity threshold in days (default 21) + +REPO="${REPO:-${GITHUB_REPOSITORY:-}}" +DAYS="${DAYS:-21}" + +if [ -z "$REPO" ]; then + echo "ERROR: REPO environment variable not set." + exit 1 +fi + +echo "------------------------------------------------------------" +echo " Inactivity Unassign Bot (Phase 2 - PR inactivity)" +echo " Repo: $REPO" +echo " Threshold: $DAYS days (no commit activity on PR)" +echo "------------------------------------------------------------" + +NOW_TS=$(date +%s) + +# Cross-platform timestamp parsing (Linux + macOS/BSD) +parse_ts() { + local ts="$1" + if date --version >/dev/null 2>&1; then + # GNU date (Linux) + date -d "$ts" +%s + else + # macOS / BSD + date -j -f "%Y-%m-%dT%H:%M:%SZ" "$ts" +"%s" + fi +} + +# Fetch open ISSUES (not PRs) that have assignees +ISSUES=$(gh api "repos/$REPO/issues" \ + --paginate \ + --jq '.[] | select(.state=="open" and (.assignees | length > 0) and (.pull_request | not)) | .number') + +if [ -z "$ISSUES" ]; then + echo "No open issues with assignees found." + exit 0 +fi + +for ISSUE in $ISSUES; do + echo "============================================================" + echo " ISSUE #$ISSUE" + echo "============================================================" + + ISSUE_JSON=$(gh api "repos/$REPO/issues/$ISSUE") + ASSIGNEES=$(echo "$ISSUE_JSON" | jq -r '.assignees[].login') + + if [ -z "$ASSIGNEES" ]; then + echo "[INFO] No assignees? Skipping." + echo + continue + fi + + echo "[INFO] Assignees: $ASSIGNEES" + echo + + for USER in $ASSIGNEES; do + echo " → Checking assignee: $USER" + + # Find OPEN PRs linked to THIS issue, authored by THIS user + PR_NUMBERS=$(gh api \ + -H "Accept: application/vnd.github.mockingbird-preview+json" \ + "repos/$REPO/issues/$ISSUE/timeline" \ + --jq ".[] + | select(.event == \"cross-referenced\") + | select(.source.issue.pull_request != null) + | select(.source.issue.user.login == \"$USER\") + | .source.issue.number") + + if [ -z "$PR_NUMBERS" ]; then + echo " [INFO] No linked PRs by $USER for this issue → Phase 1 covers the no-PR case." + echo + continue + fi + + echo " [INFO] Linked PRs by $USER: $PR_NUMBERS" + + STALE_PR="" + STALE_AGE_DAYS=0 + + # Look for a stale OPEN PR + for PR_NUM in $PR_NUMBERS; do + PR_STATE=$(gh pr view "$PR_NUM" --repo "$REPO" --json state --jq '.state') + + if [ "$PR_STATE" != "OPEN" ]; then + echo " [SKIP] PR #$PR_NUM is not open ($PR_STATE)." + continue + fi + + # Last commit date on the PR + LAST_COMMIT_DATE=$(gh api "repos/$REPO/pulls/$PR_NUM/commits" \ + --jq '.[-1].commit.committer.date // .[-1].commit.author.date' 2>/dev/null || echo "") + + if [ -z "$LAST_COMMIT_DATE" ]; then + echo " [WARN] Could not determine last commit date for PR #$PR_NUM, skipping." + continue + fi + + LAST_COMMIT_TS=$(parse_ts "$LAST_COMMIT_DATE") + AGE_DAYS=$(( (NOW_TS - LAST_COMMIT_TS) / 86400 )) + + echo " [INFO] PR #$PR_NUM last commit: $LAST_COMMIT_DATE (~${AGE_DAYS} days ago)" + + if [ "$AGE_DAYS" -ge "$DAYS" ]; then + STALE_PR="$PR_NUM" + STALE_AGE_DAYS="$AGE_DAYS" + break + fi + done + + if [ -z "$STALE_PR" ]; then + echo " [KEEP] No OPEN PR for $USER is stale (>= $DAYS days)." + echo + continue + fi + + echo " [STALE] PR #$STALE_PR by $USER has had no commit activity for $STALE_AGE_DAYS days (>= $DAYS)." + echo " [ACTION] Closing PR #$STALE_PR and unassigning @$USER from issue #$ISSUE." + + MESSAGE=$( + cat < Date: Sun, 7 Dec 2025 14:01:45 +0530 Subject: [PATCH 02/10] Set DAYS to 0 for unassigning stale PRs Signed-off-by: Akshat8510 --- .github/workflows/bot-inactivity-unassign-phase1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bot-inactivity-unassign-phase1.yml b/.github/workflows/bot-inactivity-unassign-phase1.yml index 3530400db..61e33a624 100644 --- a/.github/workflows/bot-inactivity-unassign-phase1.yml +++ b/.github/workflows/bot-inactivity-unassign-phase1.yml @@ -34,5 +34,5 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} REPO: ${{ github.repository }} - DAYS: 21 + DAYS: 0 run: bash .github/scripts/inactivity_unassign_phase2.sh From 9c921c729aa86276c642bc972fbea92e1b640386 Mon Sep 17 00:00:00 2001 From: Akshat8510 Date: Sun, 7 Dec 2025 14:02:09 +0530 Subject: [PATCH 03/10] Change DAYS from 21 to 0 in unassign workflow Signed-off-by: Akshat8510 --- .github/workflows/bot-inactivity-unassign-phase2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bot-inactivity-unassign-phase2.yml b/.github/workflows/bot-inactivity-unassign-phase2.yml index 550b90000..9f73de662 100644 --- a/.github/workflows/bot-inactivity-unassign-phase2.yml +++ b/.github/workflows/bot-inactivity-unassign-phase2.yml @@ -25,5 +25,5 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} REPO: ${{ github.repository }} - DAYS: 21 + DAYS: 0 run: bash .github/scripts/inactivity_unassign_phase2.sh From 1e2d911b82fbf4f515028397ad32a5413daa313d Mon Sep 17 00:00:00 2001 From: Akshat Kumar Date: Sun, 7 Dec 2025 17:24:20 +0530 Subject: [PATCH 04/10] feat: add inactivity bot phase 2 (stale PR detection) Signed-off-by: Akshat Kumar --- .github/workflows/bot-inactivity-unassign-phase1.yml | 2 +- .github/workflows/bot-inactivity-unassign-phase2.yml | 4 +++- CHANGELOG.md | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bot-inactivity-unassign-phase1.yml b/.github/workflows/bot-inactivity-unassign-phase1.yml index 61e33a624..3530400db 100644 --- a/.github/workflows/bot-inactivity-unassign-phase1.yml +++ b/.github/workflows/bot-inactivity-unassign-phase1.yml @@ -34,5 +34,5 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} REPO: ${{ github.repository }} - DAYS: 0 + DAYS: 21 run: bash .github/scripts/inactivity_unassign_phase2.sh diff --git a/.github/workflows/bot-inactivity-unassign-phase2.yml b/.github/workflows/bot-inactivity-unassign-phase2.yml index 9f73de662..543db01e6 100644 --- a/.github/workflows/bot-inactivity-unassign-phase2.yml +++ b/.github/workflows/bot-inactivity-unassign-phase2.yml @@ -20,10 +20,12 @@ jobs: - name: Harden the runner uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 + with: + egress-policy: audit - name: Unassign stale PR contributors (Phase 2) env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} REPO: ${{ github.repository }} - DAYS: 0 + DAYS: 21 run: bash .github/scripts/inactivity_unassign_phase2.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 03ea6b000..4cb51dbb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1. ## [Unreleased] ### Added +- Phase 2 of the inactivity-unassign bot:Automatically detects stale open pull requests (no commit activity for 21+ days), comments with a helpful InactivityBot message, closes the stale PR, and unassigns the contributor from the linked issue. - Added a github template for good first issues - Added `.github/workflows/bot-assignment-check.yml` to limit non-maintainers to 2 concurrent issue assignments. - Add examples/tokens/token_create_transaction_pause_key.py example demonstrating token pause/unpause behavior and pause key usage (#833) From 2964a1a61908f8448c0111824ba7755c15a87480 Mon Sep 17 00:00:00 2001 From: Akshat8510 Date: Sun, 7 Dec 2025 17:36:13 +0530 Subject: [PATCH 05/10] Delete test-phase2.txt Signed-off-by: Akshat8510 --- test-phase2.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test-phase2.txt diff --git a/test-phase2.txt b/test-phase2.txt deleted file mode 100644 index 83c831f0b..000000000 --- a/test-phase2.txt +++ /dev/null @@ -1 +0,0 @@ -# test From 3f03d199df8c45763c1ba81d92f1e245e06efec6 Mon Sep 17 00:00:00 2001 From: Akshat Kumar Date: Mon, 8 Dec 2025 00:12:49 +0530 Subject: [PATCH 06/10] fix: improve latest commit detection via timestamp sorting in Phase 2 bot Signed-off-by: Akshat Kumar --- .../scripts/dry_run_inactivity_unassign_phase2.sh | 10 +++++++--- .github/scripts/inactivity_unassign_phase2.sh | 14 ++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/scripts/dry_run_inactivity_unassign_phase2.sh b/.github/scripts/dry_run_inactivity_unassign_phase2.sh index e34042323..b4586f35d 100755 --- a/.github/scripts/dry_run_inactivity_unassign_phase2.sh +++ b/.github/scripts/dry_run_inactivity_unassign_phase2.sh @@ -93,10 +93,14 @@ for ISSUE in $ISSUES; do continue fi - LAST_COMMIT_DATE=$(gh api "repos/$REPO/pulls/$PR_NUM/commits" \ - --jq '.[-1].commit.committer.date // .[-1].commit.author.date' 2>/dev/null || echo "") + # Use the same "max by timestamp" logic as the real bot + COMMITS_JSON=$(gh api "repos/$REPO/pulls/$PR_NUM/commits" 2>/dev/null || echo "") - if [ -z "$LAST_COMMIT_DATE" ]; then + LAST_COMMIT_DATE=$(echo "$COMMITS_JSON" \ + | jq -r 'max_by(.commit.committer.date // .commit.author.date) + | (.commit.committer.date // .commit.author.date)' 2>/dev/null || echo "") + + if [ -z "$LAST_COMMIT_DATE" ] || [ "$LAST_COMMIT_DATE" = "null" ]; then echo " [WARN] Could not determine last commit date for PR #$PR_NUM, skipping." continue fi diff --git a/.github/scripts/inactivity_unassign_phase2.sh b/.github/scripts/inactivity_unassign_phase2.sh index da14dbddc..e7a3500a9 100755 --- a/.github/scripts/inactivity_unassign_phase2.sh +++ b/.github/scripts/inactivity_unassign_phase2.sh @@ -94,11 +94,17 @@ for ISSUE in $ISSUES; do continue fi - # Last commit date on the PR - LAST_COMMIT_DATE=$(gh api "repos/$REPO/pulls/$PR_NUM/commits" \ - --jq '.[-1].commit.committer.date // .[-1].commit.author.date' 2>/dev/null || echo "") + # Last commit date on the PR: pick the truly latest by timestamp + COMMITS_JSON=$(gh api "repos/$REPO/pulls/$PR_NUM/commits" --paginate 2>/dev/null || echo "[]") - if [ -z "$LAST_COMMIT_DATE" ]; then + LAST_COMMIT_DATE=$(echo "$COMMITS_JSON" \ + | jq -r ' + select(length > 0) + | max_by(.commit.committer.date // .commit.author.date) + | (.commit.committer.date // .commit.author.date) + ') + + if [ -z "$LAST_COMMIT_DATE" ] || [ "$LAST_COMMIT_DATE" = "null" ]; then echo " [WARN] Could not determine last commit date for PR #$PR_NUM, skipping." continue fi From 8f593fd0e17ff21b96b6e28e14779948c8772376 Mon Sep 17 00:00:00 2001 From: Akshat Kumar Date: Mon, 8 Dec 2025 11:41:21 +0530 Subject: [PATCH 07/10] fix: align Phase 2 inactivity bot with paginated last-commit detection Signed-off-by: Akshat Kumar --- .github/scripts/dry_run_inactivity_unassign_phase2.sh | 7 +++---- .github/scripts/inactivity_unassign_phase2.sh | 11 ++++------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/scripts/dry_run_inactivity_unassign_phase2.sh b/.github/scripts/dry_run_inactivity_unassign_phase2.sh index b4586f35d..4c48075a4 100755 --- a/.github/scripts/dry_run_inactivity_unassign_phase2.sh +++ b/.github/scripts/dry_run_inactivity_unassign_phase2.sh @@ -93,12 +93,11 @@ for ISSUE in $ISSUES; do continue fi - # Use the same "max by timestamp" logic as the real bot - COMMITS_JSON=$(gh api "repos/$REPO/pulls/$PR_NUM/commits" 2>/dev/null || echo "") + # Use the same "last commit" logic as the real bot (with pagination) + COMMITS_JSON=$(gh api "repos/$REPO/pulls/$PR_NUM/commits" --paginate 2>/dev/null || echo "") LAST_COMMIT_DATE=$(echo "$COMMITS_JSON" \ - | jq -r 'max_by(.commit.committer.date // .commit.author.date) - | (.commit.committer.date // .commit.author.date)' 2>/dev/null || echo "") + | jq -r 'last | (.commit.committer.date // .commit.author.date)' 2>/dev/null || echo "") if [ -z "$LAST_COMMIT_DATE" ] || [ "$LAST_COMMIT_DATE" = "null" ]; then echo " [WARN] Could not determine last commit date for PR #$PR_NUM, skipping." diff --git a/.github/scripts/inactivity_unassign_phase2.sh b/.github/scripts/inactivity_unassign_phase2.sh index e7a3500a9..af0ac5976 100755 --- a/.github/scripts/inactivity_unassign_phase2.sh +++ b/.github/scripts/inactivity_unassign_phase2.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash set -euo pipefail +# Inactivity Unassign Bot (Phase 2 - PR inactivity) # Env: # GH_TOKEN - provided by GitHub Actions # REPO - owner/repo (fallback to GITHUB_REPOSITORY) @@ -94,15 +95,11 @@ for ISSUE in $ISSUES; do continue fi - # Last commit date on the PR: pick the truly latest by timestamp - COMMITS_JSON=$(gh api "repos/$REPO/pulls/$PR_NUM/commits" --paginate 2>/dev/null || echo "[]") + # Last commit date on the PR (use API order + paginate, take last) + COMMITS_JSON=$(gh api "repos/$REPO/pulls/$PR_NUM/commits" --paginate 2>/dev/null || echo "") LAST_COMMIT_DATE=$(echo "$COMMITS_JSON" \ - | jq -r ' - select(length > 0) - | max_by(.commit.committer.date // .commit.author.date) - | (.commit.committer.date // .commit.author.date) - ') + | jq -r 'last | (.commit.committer.date // .commit.author.date)' 2>/dev/null || echo "") if [ -z "$LAST_COMMIT_DATE" ] || [ "$LAST_COMMIT_DATE" = "null" ]; then echo " [WARN] Could not determine last commit date for PR #$PR_NUM, skipping." From e4daf9fd86c77918b33c955ad55750f924ae7e5f Mon Sep 17 00:00:00 2001 From: Akshat8510 Date: Mon, 8 Dec 2025 11:44:25 +0530 Subject: [PATCH 08/10] Update CHANGELOG.md Signed-off-by: Akshat8510 --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b3ca13ca..bbec9cbfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,6 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1. ### Added - Phase 2 of the inactivity-unassign bot:Automatically detects stale open pull requests (no commit activity for 21+ days), comments with a helpful InactivityBot message, closes the stale PR, and unassigns the contributor from the linked issue. - Added __str__() to CustomFixedFee and updated examples and tests accordingly. -- Added **str**() to CustomFixedFee and updated examples and tests accordingly. - Added a github template for good first issues - Added `.github/workflows/bot-assignment-check.yml` to limit non-maintainers to 2 concurrent issue assignments. - Added all missing fields to **str**() method and updated `test_tokem_info.py` From 6933b02e0cea85e55f7d39d62d376ee6029fa92f Mon Sep 17 00:00:00 2001 From: Akshat8510 Date: Mon, 8 Dec 2025 11:45:25 +0530 Subject: [PATCH 09/10] Update CHANGELOG with recent changes and additions Updated the CHANGELOG to reflect recent additions and changes, including improvements to the inactivity-unassign bot and updates to the CustomFixedFee class. Signed-off-by: Akshat8510 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbec9cbfd..173f0f03b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1. ### Added - Phase 2 of the inactivity-unassign bot:Automatically detects stale open pull requests (no commit activity for 21+ days), comments with a helpful InactivityBot message, closes the stale PR, and unassigns the contributor from the linked issue. -- Added __str__() to CustomFixedFee and updated examples and tests accordingly. +- Added **str**() to CustomFixedFee and updated examples and tests accordingly. - Added a github template for good first issues - Added `.github/workflows/bot-assignment-check.yml` to limit non-maintainers to 2 concurrent issue assignments. - Added all missing fields to **str**() method and updated `test_tokem_info.py` From cbc56914691f4409fbdcbdfce18e4b9c2c9e0e18 Mon Sep 17 00:00:00 2001 From: Akshat Kumar Date: Mon, 8 Dec 2025 15:09:38 +0530 Subject: [PATCH 10/10] chore: remove duplicate Phase 2 workflow Signed-off-by: Akshat Kumar --- .../bot-inactivity-unassign-phase2.yml | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 .github/workflows/bot-inactivity-unassign-phase2.yml diff --git a/.github/workflows/bot-inactivity-unassign-phase2.yml b/.github/workflows/bot-inactivity-unassign-phase2.yml deleted file mode 100644 index 543db01e6..000000000 --- a/.github/workflows/bot-inactivity-unassign-phase2.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: bot-inactivity-unassign-phase2 - -on: - schedule: - - cron: "0 12 * * *" - workflow_dispatch: - -permissions: - contents: read - issues: write - pull-requests: write - -jobs: - inactivity-unassign-phase2: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 - - - name: Harden the runner - uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 - with: - egress-policy: audit - - - name: Unassign stale PR contributors (Phase 2) - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO: ${{ github.repository }} - DAYS: 21 - run: bash .github/scripts/inactivity_unassign_phase2.sh