Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/bot-office-hours.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
echo "Meeting week detected. Proceeding to notify open PRs."

REPO="${{ github.repository }}"
PR_LIST=$(gh pr list --repo $REPO --state open --json number --jq '.[].number')
PR_DATA=$(gh pr list --repo $REPO --state open --json number,author,createdAt)

if [ -z "$PR_LIST" ]; then
if [ -z "$PR_DATA" ] || [ "$PR_DATA" = "[]" ]; then
echo "No open PRs found."
exit 0
fi
Expand All @@ -59,8 +59,8 @@ jobs:
EOF
)

for PR_NUM in $PR_LIST; do
echo "Processing PR #$PR_NUM"
echo "$PR_DATA" | jq -r 'group_by(.author.login) | .[] | sort_by(.createdAt) | reverse | .[0] | .number' | while read PR_NUM; do
echo "Processing most recent PR #$PR_NUM for user"

ALREADY_COMMENTED=$(gh pr view $PR_NUM --repo $REPO --json comments --jq '.comments[].body' | grep -F "Office Hour Bot" || true)

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
- Added GitHub workflow that makes sure newly added test files follow pytest test files naming conventions (#1054)

### Changed
- Reduce office-hours reminder spam by posting only on each user's most recent open PR, grouping by author and sorting by creation time (#1121)
- Pylint cleanup for token_airdrop_transaction_cancel.py (#1081) [@tiya-15](https://github.com/tiya-15)
- Move `account_allowance_delete_transaction_hbar.py` from `examples/` to `examples/account/` for better organization (#1003)
- Improved consistency of transaction examples (#1120)
Expand Down