From e19ce18513e2afb9d968c837e22076e079a1ba2e Mon Sep 17 00:00:00 2001 From: exploreriii <133720349+exploreriii@users.noreply.github.com> Date: Sat, 8 Nov 2025 17:15:05 +0000 Subject: [PATCH 1/2] feat: verified commit bot Signed-off-by: exploreriii <133720349+exploreriii@users.noreply.github.com> --- .github/workflows/bot-verified-commits.yml | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/bot-verified-commits.yml diff --git a/.github/workflows/bot-verified-commits.yml b/.github/workflows/bot-verified-commits.yml new file mode 100644 index 000000000..52a0522fa --- /dev/null +++ b/.github/workflows/bot-verified-commits.yml @@ -0,0 +1,58 @@ +name: PythonBot - Verify PR Commits + +on: + pull_request: + types: [opened, reopened, synchronize, ready_for_review] + +permissions: + contents: read + pull-requests: write + +jobs: + verify-commits: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + + - name: Check for unverified commits + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_NUMBER=${{ github.event.pull_request.number }} + REPO="${{ github.repository }}" + COMMITS_URL="https://github.com/$REPO/pull/${{ PR_NUMBER }}/commits" + + echo "Checking commits in PR #$PR_NUMBER for repository $REPO..." + + COMMITS_JSON=$(gh api repos/$REPO/pulls/$PR_NUMBER/commits) + UNVERIFIED_COUNT=$(echo "$COMMITS_JSON" | jq '[.[] | select(.commit.verification.verified == false)] | length') + + echo "Unverified commits: $UNVERIFIED_COUNT" + + if [ "$UNVERIFIED_COUNT" -gt 0 ]; then + COMMENT=$(cat </dev/null || \ + (gh pr comment $PR_NUMBER --repo $REPO --body "$COMMENT" && echo "Comment added to PR #$PR_NUMBER") + else + echo "All commits in PR #$PR_NUMBER are verified." + fi + \ No newline at end of file From 43c1c9504b883bf1d257f32a1f21a8aa8ab3b2b1 Mon Sep 17 00:00:00 2001 From: exploreriii <133720349+exploreriii@users.noreply.github.com> Date: Sat, 8 Nov 2025 17:16:20 +0000 Subject: [PATCH 2/2] chore: new workflow for verified commit checking Signed-off-by: exploreriii <133720349+exploreriii@users.noreply.github.com> --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62b941d59..a7be04a76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,9 @@ This project adheres to [Semantic Versioning](https://semver.org). This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] - + ### Added +- workflow: github bot to respond to unverified PR commits (#750) - Add `TokenFeeScheduleUpdateTransaction` class to support updating custom fee schedules on tokens (#471). - Add `examples/token_update_fee_schedule_fungible.py` and `examples/token_update_fee_schedule_nft.py` demonstrating the use of `TokenFeeScheduleUpdateTransaction`. - Update `docs/sdk_users/running_examples.md` to include `TokenFeeScheduleUpdateTransaction`.