Skip to content

Commit cca48ee

Browse files
adityashirsatrao007exploreriii
authored andcommitted
docs: Create docs/maintainers/team.md
Fixes hiero-ledger#1064. Adds team documentation listing Triage, Committer, and Maintainer members. Signed-off-by: Aditya <[email protected]>
1 parent 7e3a67d commit cca48ee

File tree

4 files changed

+222
-23
lines changed

4 files changed

+222
-23
lines changed
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
# Mentor Assignment Script for New Contributors
5+
# This script automatically assigns a mentor from the triage team to new contributors
6+
# working on "good first issue" labeled issues.
7+
#
8+
# Environment Variables:
9+
# ASSIGNEE - GitHub username of the issue assignee
10+
# ISSUE_NUMBER - Issue number
11+
# REPO - Repository in format owner/repo
12+
# DRY_RUN - If set to "1", only logs actions without posting comments
13+
14+
# Default DRY_RUN to 0 if not set
15+
DRY_RUN="${DRY_RUN:-0}"
16+
17+
if [ -z "$ASSIGNEE" ] || [ -z "$ISSUE_NUMBER" ] || [ -z "$REPO" ]; then
18+
echo "Error: Missing required environment variables (ASSIGNEE, ISSUE_NUMBER, REPO)."
19+
exit 1
20+
fi
21+
22+
echo "Processing mentor assignment for user $ASSIGNEE on issue #$ISSUE_NUMBER"
23+
echo "DRY_RUN mode: $DRY_RUN"
24+
25+
# Triage team configuration
26+
TRIAGE_ORG="hiero-ledger"
27+
TRIAGE_TEAM_SLUG="hiero-sdk-python-triage"
28+
TRIAGE_TEAM="$TRIAGE_ORG/$TRIAGE_TEAM_SLUG"
29+
30+
# Check if the issue has "good first issue" label
31+
LABELS_JSON=$(gh issue view "$ISSUE_NUMBER" --repo "$REPO" --json labels)
32+
HAS_GFI_LABEL=$(echo "$LABELS_JSON" | jq -r '.labels[] | select(.name == "good first issue") | .name')
33+
34+
if [ -z "$HAS_GFI_LABEL" ]; then
35+
echo "Issue #$ISSUE_NUMBER does not have 'good first issue' label. Skipping mentor assignment."
36+
exit 0
37+
fi
38+
39+
echo "Issue has 'good first issue' label. Checking if $ASSIGNEE is a new contributor..."
40+
41+
# Check if user is a maintainer/committer (they don't need a mentor)
42+
PERM_JSON=$(gh api "repos/$REPO/collaborators/$ASSIGNEE/permission" 2>/dev/null || echo '{"permission":"none"}')
43+
PERMISSION=$(echo "$PERM_JSON" | jq -r '.permission')
44+
45+
echo "User permission level: $PERMISSION"
46+
47+
if [[ "$PERMISSION" == "admin" ]] || [[ "$PERMISSION" == "write" ]]; then
48+
echo "User is a maintainer or committer. No mentor needed."
49+
exit 0
50+
fi
51+
52+
# Check if user has any merged PRs (indicating they're not a new contributor)
53+
MERGED_PRS=$(gh pr list --repo "$REPO" --author "$ASSIGNEE" --state merged --limit 1 --json number | jq '. | length')
54+
55+
if [ "$MERGED_PRS" -gt 0 ]; then
56+
echo "User $ASSIGNEE has previously merged PRs. Not a new contributor, skipping mentor assignment."
57+
exit 0
58+
fi
59+
60+
echo "User $ASSIGNEE is a new contributor. Assigning a mentor..."
61+
62+
# Try to get team members via API (requires appropriate permissions)
63+
MENTORS_JSON=$(gh api "orgs/$TRIAGE_ORG/teams/$TRIAGE_TEAM_SLUG/members" 2>/dev/null || echo "[]")
64+
MENTORS_COUNT=$(echo "$MENTORS_JSON" | jq '. | length')
65+
66+
if [ "$MENTORS_COUNT" -eq 0 ]; then
67+
echo "Could not fetch team members. Using team mention instead."
68+
MENTOR="@$TRIAGE_TEAM"
69+
MENTOR_MENTION="$TRIAGE_TEAM"
70+
else
71+
# Select a random mentor from the list (excluding the assignee)
72+
AVAILABLE_MENTORS=$(echo "$MENTORS_JSON" | jq -r --arg assignee "$ASSIGNEE" '[.[] | select(.login != $assignee) | .login]')
73+
AVAILABLE_COUNT=$(echo "$AVAILABLE_MENTORS" | jq '. | length')
74+
75+
if [ "$AVAILABLE_COUNT" -eq 0 ]; then
76+
echo "No available mentors found."
77+
MENTOR="@$TRIAGE_TEAM"
78+
MENTOR_MENTION="$TRIAGE_TEAM"
79+
else
80+
# Select random mentor
81+
RANDOM_INDEX=$((RANDOM % AVAILABLE_COUNT))
82+
MENTOR=$(echo "$AVAILABLE_MENTORS" | jq -r ".[$RANDOM_INDEX]")
83+
MENTOR_MENTION="@$MENTOR"
84+
echo "Selected mentor: $MENTOR"
85+
fi
86+
fi
87+
88+
# Post welcome message with mentor assignment
89+
WELCOME_MSG=$(cat <<EOF
90+
👋 **Welcome to the Hiero Python SDK, @$ASSIGNEE!**
91+
92+
We're excited to have you contribute to our project! You are now officially assigned to this issue.
93+
94+
📚 **Before you begin, please:**
95+
1. Read the issue description carefully
96+
2. Check out our [Contributing Guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/CONTRIBUTING.md)
97+
3. Review the [DCO signing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md)
98+
99+
🧑‍🏫 **Your Mentor:** $MENTOR_MENTION
100+
101+
We've assigned a mentor from our triage team to help guide you through your first contribution. Feel free to reach out to them by mentioning them in the comments if you have any questions or need assistance.
102+
103+
💡 **Helpful Resources:**
104+
- [Changelog Guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md)
105+
- [Testing Guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/testing.md)
106+
- [Discord Community](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/discord.md)
107+
- [Community Calls](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week)
108+
109+
⭐ If you enjoy working on this project, don't forget to [star the repository](https://github.com/hiero-ledger/hiero-sdk-python)!
110+
111+
Best of luck with your contribution!
112+
*From the Hiero Python SDK Team* 🚀
113+
EOF
114+
)
115+
116+
# Check if we've already posted a welcome message for this user on this issue
117+
# Uses the bot's username and checks for the welcome message pattern
118+
EXISTING_WELCOME=$(gh issue view "$ISSUE_NUMBER" --repo "$REPO" --comments --json comments \
119+
| jq -r --arg assignee "$ASSIGNEE" '
120+
.comments[]
121+
| select(.body | test("Welcome to the Hiero Python SDK,?\\s*@" + $assignee))
122+
| .id' | head -1)
123+
124+
if [ -n "$EXISTING_WELCOME" ]; then
125+
echo "Welcome message already posted for $ASSIGNEE on issue #$ISSUE_NUMBER. Skipping."
126+
exit 0
127+
fi
128+
129+
if [ "$DRY_RUN" = "1" ]; then
130+
echo "=== DRY RUN MODE ==="
131+
echo "Would post the following welcome message to issue #$ISSUE_NUMBER:"
132+
echo "---"
133+
echo "$WELCOME_MSG"
134+
echo "---"
135+
echo "DRY RUN: No comment posted."
136+
else
137+
echo "Posting welcome message..."
138+
gh issue comment "$ISSUE_NUMBER" --repo "$REPO" --body "$WELCOME_MSG"
139+
echo "Mentor assignment complete!"
140+
fi
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: PythonBot - Mentor Assignment
2+
3+
on:
4+
issues:
5+
types: [assigned]
6+
workflow_dispatch:
7+
inputs:
8+
dry_run:
9+
description: "Run in dry-run mode (logs only, no comments posted)"
10+
required: true
11+
default: true
12+
type: boolean
13+
issue_number:
14+
description: "Issue number to test with (required for workflow_dispatch)"
15+
required: false
16+
type: string
17+
assignee:
18+
description: "Assignee username to test with (required for workflow_dispatch)"
19+
required: false
20+
type: string
21+
22+
permissions:
23+
issues: write
24+
members: read
25+
26+
concurrency:
27+
group: mentor-assignment-${{ github.event.issue.number || github.event.inputs.issue_number }}
28+
cancel-in-progress: false
29+
30+
jobs:
31+
assign-mentor:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Harden the runner (Audit all outbound calls)
35+
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
36+
with:
37+
egress-policy: audit
38+
39+
- name: Checkout repository
40+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
41+
42+
- name: Assign Mentor to New Contributors
43+
env:
44+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
ASSIGNEE: ${{ github.event.assignee.login || github.event.inputs.assignee }}
46+
ISSUE_NUMBER: ${{ github.event.issue.number || github.event.inputs.issue_number }}
47+
REPO: ${{ github.repository }}
48+
DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.dry_run == 'true' && '1' || '0') || '0' }}
49+
run: |
50+
chmod +x .github/scripts/mentor_assignment.sh
51+
./.github/scripts/mentor_assignment.sh

CHANGELOG.md

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
66

77
## [Unreleased]
88

9-
10-
119
### Added
1210
- examples/mypy.ini for stricter type checking in example scripts
1311
- Added a GitHub Actions workflow that reminds contributors to link pull requests to issues.
@@ -17,13 +15,14 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
1715
- Codecov workflow
1816
- Added unit tests for `key_format.py` to improve coverage.
1917
- Fix inactivity bot execution for local dry-run testing.
18+
- Added automatic mentor assignment bot for new contributors on good first issues (`.github/workflows/bot-mentor-assignment.yml`) (#1063)
19+
- Added `docs/maintainers/hiero_python_sdk_team.md` listing team members and roles (#1064)
2020
- Added Good First Issue candidate guidelines documentation (`docs/maintainers/good_first_issue_candidate_guidelines.md`) and Good First Issues guidelines documentation (`docs/maintainers/good_first_issues_guidelines.md`) (#1066)
2121
- Added documentation: "Testing GitHub Actions using Forks" (`docs/sdk_developers/training/testing_forks.md`).
2222
- Unified the inactivity-unassign bot into a single script with `DRY_RUN` support, and fixed handling of cross-repo PR references for stale detection.
2323
- Added unit tests for `SubscriptionHandle` class covering cancellation state, thread management, and join operations.
2424
- Refactored `account_create_transaction_create_with_alias.py` example by splitting monolithic function into modular functions: `generate_main_and_alias_keys()`, `create_account_with_ecdsa_alias()`, `fetch_account_info()`, `print_account_summary()` (#1016)
2525
- Added `.github/workflows/bot-pr-auto-draft-on-changes.yml` to automatically convert PRs to draft and notify authors when reviewers request changes.
26-
-
2726
- Modularized `transfer_transaction_fungible` example by introducing `account_balance_query()` & `transfer_transaction()`.Renamed `transfer_tokens()``main()`
2827
- 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.
2928
- Added `__str__()` to CustomFixedFee and updated examples and tests accordingly.
@@ -43,9 +42,9 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
4342
- Support selecting specific node account ID(s) for queries and transactions and added `Network._get_node()` with updated execution flow (#362)
4443
- Add TLS support with two-stage control (`set_transport_security()` and `set_verify_certificates()`) for encrypted connections to Hedera networks. TLS is enabled by default for hosted networks (mainnet, testnet, previewnet) and disabled for local networks (solo, localhost) (#855)
4544
- Add PR inactivity reminder bot for stale pull requests `.github/workflows/pr-inactivity-reminder-bot.yml`
46-
- Add comprehensive training documentation for _Executable class `docs/sdk_developers/training/executable.md`
45+
- Add comprehensive training documentation for \_Executable class `docs/sdk_developers/training/executable.md`
4746
- Added empty `docs/maintainers/good_first_issues.md` file for maintainers to write Good First Issue guidelines (#1034)
48-
- Added new `.github/ISSUE_TEMPLATE/04_good_first_issue_candidate.yml` file (1068)(https://github.com/hiero-ledger/hiero-sdk-python/issues/1068)
47+
-Added new `.github/ISSUE_TEMPLATE/04_good_first_issue_candidate.yml` file (1068)(https://github.com/hiero-ledger/hiero-sdk-python/issues/1068)
4948
- Enhanced `.github/ISSUE_TEMPLATE/01_good_first_issue.yml` with welcoming message and acceptance criteria sections to guide contributors in creating quality GFIs (#1052)
5049
- Add workflow to notify team about P0 issues `bot-p0-issues-notify-team.yml`
5150
- Added Issue Reminder (no-PR) bot, .github/scripts/issue_reminder_no_pr.sh and .github/workflows/bot-issue-reminder-no-pr.yml to automatically detect assigned issues with no linked pull requests for 7+ days and post a gentle ReminderBot comment.(#951)
@@ -58,10 +57,6 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
5857
- Add new tests to `tests/unit/topic_info_query_test.py` (#1124)
5958

6059
### Changed
61-
- 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)
62-
- Pylint cleanup for token_airdrop_transaction_cancel.py (#1081) [@tiya-15](https://github.com/tiya-15)
63-
- Move `account_allowance_delete_transaction_hbar.py` from `examples/` to `examples/account/` for better organization (#1003)
64-
- Improved consistency of transaction examples (#1120)
6560
- Refactored `account_create_transaction_with_fallback_alias.py` by splitting the monolithic `create_account_with_fallback_alias` function into modular functions: `generate_fallback_key`, `fetch_account_info`, and `print_account_summary`. The existing `setup_client()` function was reused for improved readability and structure (#1018)
6661
- Allow `PublicKey` for batch_key in `Transaction`, enabling both `PrivateKey` and `PublicKey` for batched transactions
6762
- Allow `PublicKey` for `TokenUpdateKeys` in `TokenUpdateTransaction`, enabling non-custodial workflows where operators can build transactions using only public keys (#934).
@@ -75,19 +70,6 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
7570
`examples.yml``pr-check-examples.yml`,
7671
`test.yml``pr-check-test.yml` (#1043)
7772
- Cleaned up `token_airdrop_claim_auto` example for pylint compliance (no functional changes). (#1079)
78-
- Formatted `examples/query` using black (#1082)(https://github.com/hiero-ledger/hiero-sdk-python/issues/1082)
79-
- Update team notification script and workflow for P0 issues 'p0_issues_notify_team.js'
80-
- Rename test files across the repository to ensure they consistently end with _test.py (#1055)
81-
- Cleaned up `token_airdrop_claim_signature_required` example for pylint compliance (no functional changes). (#1080)
82-
- Rename the file 'test_token_fee_schedule_update_transaction_e2e.py' to make it ends with _test.py as all other test files.(#1117)
83-
- Format token examples with Black for consistent code style and improved readability (#1119)
84-
- Transformed `examples/tokens/custom_fee_fixed.py` to be an end-to-end example, that interacts with the Hedera network, rather than a static object demo.
85-
- Format token examples with Black for consistent code style and improved readability (#1119)
86-
- Replaced `ResponseCode.get_name(receipt.status)` with the `ResponseCode(receipt.status).name` across examples and integration tests for consistency. (#1136)
87-
- Moved helpful references to Additional Context section and added clickable links.
88-
- Transformed `examples\tokens\custom_royalty_fee.py` to be an end-to-end example, that interacts with the Hedera network, rather than a static object demo.
89-
90-
9173

9274

9375
### Fixed
@@ -666,4 +648,3 @@ contract_call_local_pb2.ContractLoginfo -> contract_types_pb2.ContractLoginfo
666648
### Removed
667649

668650
- N/A
669-
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Hiero Python SDK Team
2+
3+
## Triage Members
4+
5+
| Name | GitHub ID |
6+
| ---- | --------- |
7+
| | |
8+
9+
[View Team on GitHub](https://github.com/orgs/hiero-ledger/teams/hiero-sdk-python-triage)
10+
11+
## Committer Members
12+
13+
| Name | GitHub ID |
14+
| ---- | --------- |
15+
| | |
16+
17+
[View Team on GitHub](https://github.com/orgs/hiero-ledger/teams/hiero-sdk-python-committers)
18+
19+
## Maintainer Members
20+
21+
| Name | GitHub ID |
22+
| -------------- | ------------ |
23+
| Nadine Loepfe | nadineloepfe |
24+
| Sophie Bulloch | exploreriii |
25+
| Richard Bair | rbair23 |
26+
27+
[View Team on GitHub](https://github.com/orgs/hiero-ledger/teams/hiero-sdk-python-maintainers)

0 commit comments

Comments
 (0)