Skip to content

Commit 81e18fd

Browse files
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 682ca7b commit 81e18fd

File tree

4 files changed

+223
-7
lines changed

4 files changed

+223
-7
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: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
66

77
## [Unreleased]
88

9-
10-
119
### Added
1210

1311
- Fix inactivity bot execution for local dry-run testing.
12+
- Added automatic mentor assignment bot for new contributors on good first issues (`.github/workflows/bot-mentor-assignment.yml`) (#1063)
13+
- Added `docs/maintainers/hiero_python_sdk_team.md` listing team members and roles (#1064)
1414
- Added documentation: "Testing GitHub Actions using Forks" (`docs/sdk_developers/training/testing_forks.md`).
1515
- Unified the inactivity-unassign bot into a single script with `DRY_RUN` support, and fixed handling of cross-repo PR references for stale detection.
1616
- Added unit tests for `SubscriptionHandle` class covering cancellation state, thread management, and join operations.
1717
- 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)
1818
- Added `.github/workflows/bot-pr-auto-draft-on-changes.yml` to automatically convert PRs to draft and notify authors when reviewers request changes.
19-
-
2019
- Modularized `transfer_transaction_fungible` example by introducing `account_balance_query()` & `transfer_transaction()`.Renamed `transfer_tokens()``main()`
2120
- 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.
2221
- Added `__str__()` to CustomFixedFee and updated examples and tests accordingly.
@@ -35,12 +34,13 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
3534
- Support selecting specific node account ID(s) for queries and transactions and added `Network._get_node()` with updated execution flow (#362)
3635
- 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)
3736
- Add PR inactivity reminder bot for stale pull requests `.github/workflows/pr-inactivity-reminder-bot.yml`
38-
- Add comprehensive training documentation for _Executable class `docs/sdk_developers/training/executable.md`
37+
- Add comprehensive training documentation for \_Executable class `docs/sdk_developers/training/executable.md`
3938
- Added empty `docs/maintainers/good_first_issues.md` file for maintainers to write Good First Issue guidelines (#1034)
40-
-Added new `.github/ISSUE_TEMPLATE/04_good_first_issue_candidate.yml` file (1068)(https://github.com/hiero-ledger/hiero-sdk-python/issues/1068)
39+
-Added new `.github/ISSUE_TEMPLATE/04_good_first_issue_candidate.yml` file (1068)(https://github.com/hiero-ledger/hiero-sdk-python/issues/1068)
4140
- Enhanced `.github/ISSUE_TEMPLATE/01_good_first_issue.yml` with welcoming message and acceptance criteria sections to guide contributors in creating quality GFIs (#1052)
4241

4342
### Changed
43+
4444
- 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)
4545
- Allow `PublicKey` for `TokenUpdateKeys` in `TokenUpdateTransaction`, enabling non-custodial workflows where operators can build transactions using only public keys (#934).
4646
- Bump protobuf toml to protobuf==6.33.2
@@ -53,7 +53,6 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
5353
`test.yml``pr-check-test.yml` (#1043)
5454
- Cleaned up `token_airdrop_claim_auto` example for pylint compliance (no functional changes). (#1079)
5555

56-
5756
### Fixed
5857

5958
- Fixed inactivity bot workflow not checking out repository before running (#964)
@@ -627,4 +626,3 @@ contract_call_local_pb2.ContractLoginfo -> contract_types_pb2.ContractLoginfo
627626
### Removed
628627

629628
- N/A
630-
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)