diff --git a/.github/ISSUE_TEMPLATE/01_good_first_issue_candidate.yml b/.github/ISSUE_TEMPLATE/01_good_first_issue_candidate.yml index 7d42838ee..75f79894d 100644 --- a/.github/ISSUE_TEMPLATE/01_good_first_issue_candidate.yml +++ b/.github/ISSUE_TEMPLATE/01_good_first_issue_candidate.yml @@ -237,6 +237,7 @@ body: EDIT OR EXPAND THE CHECKLIST ON WHAT IS REQUIRED TO BE ABLE TO MERGE A PULL REQUEST FOR THIS ISSUE value: | To be able to merge a pull request for this issue, we need: + - [ ] **Assignment:** You must be assigned to the issue, comment: \assign in the issue to get assigned [see guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/training/workflow/04_assigning_issues.md)) - [ ] **Changelog Entry:** Correct changelog entry (please link to the documentation - [see guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md)) - [ ] **Signed commits:** commits must be DCO and GPG key signed ([see guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md)) - [ ] **All Tests Pass:** our workflow checks like unit and integration tests must pass @@ -253,14 +254,14 @@ body: value: | If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow. - - [ ] **Claim this issue:** Comment below that you are interested in working on the issue. Without assignment, your pull requests might be closed and the issue given to another developer. - - [ ] **Wait for assignment:** A community member with the given rights will add you as an assignee of the issue + - [ ] **Assignment:** You must be assigned to the issue, comment: \assign in the issue to get assigned [see guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/training/workflow/04_assigning_issues.md)) - [ ] **Fork, Branch and Work on the issue:** Create a copy of the repository, create a branch for the issue and solve the problem. For instructions, please read our [Contributing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/CONTRIBUTING.md) file. Further help can be found at [Set-up Training](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers/training/setup) and [Workflow Training](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers/training/workflow). - [ ] **DCO and GPG key sign each commit :** each commit must be -s and -S signed. An explanation on how to do this is at [Signing Guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md) - [ ] **Add a Changelog Entry :** your pull request will require a changelog. Read [Changelog Entry Guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md) to learn how. - [ ] **Push and Create a Pull Request :** Once your issue is resolved, and your commits are signed, and you have a changelog entry, push your changes and create a pull request. Detailed instructions can be found at [Submit PR Training](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/training/workflow/11_submit_pull_request.md), part of [Workflow Training](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers/training/workflow). - [ ] **You did it 🎉:** A maintainer or committer will review your pull request and provide feedback. If approved, we will merge the fix in the main branch. Thanks for being part of the Hiero community as an open-source contributor ❤️ + ***IMPORTANT*** You will ONLY be assigned to the issue if you comment: \assign ***IMPORTANT*** Your pull request CANNOT BE MERGED until you add a changelog entry AND sign your commits each with `git commit -S -s -m "chore: your commit message"` with a GPG key setup. validations: required: true diff --git a/.github/ISSUE_TEMPLATE/04_good_first_issue.yml b/.github/ISSUE_TEMPLATE/04_good_first_issue.yml index 320c370f7..8a0d4deeb 100644 --- a/.github/ISSUE_TEMPLATE/04_good_first_issue.yml +++ b/.github/ISSUE_TEMPLATE/04_good_first_issue.yml @@ -229,6 +229,7 @@ body: EDIT OR EXPAND THE CHECKLIST ON WHAT IS REQUIRED TO BE ABLE TO MERGE A PULL REQUEST FOR THIS ISSUE value: | To be able to merge a pull request for this issue, we need: + - [ ] **Assignment:** You must be assigned to the issue, comment: "\assign" in the issue to get assigned [see guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/training/workflow/04_assigning_issues.md)) - [ ] **Changelog Entry:** Correct changelog entry (please link to the documentation - [see guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md)) - [ ] **Signed commits:** commits must be DCO and GPG key signed ([see guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md)) - [ ] **All Tests Pass:** our workflow checks like unit and integration tests must pass @@ -245,7 +246,7 @@ body: value: | If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow. - - [ ] **Claim this issue:** Comment below that you are interested in working on the issue. Without assignment, your pull requests might be closed and the issue given to another developer. + - [ ] **Assignment:** You must be assigned to the issue, comment: \assign in the issue to get assigned [see guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/training/workflow/04_assigning_issues.md)) - [ ] **Wait for assignment:** A community member with the given rights will add you as an assignee of the issue - [ ] **Fork, Branch and Work on the issue:** Create a copy of the repository, create a branch for the issue and solve the problem. For instructions, please read our [Contributing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/CONTRIBUTING.md) file. Further help can be found at [Set-up Training](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers/training/setup) and [Workflow Training](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers/training/workflow). - [ ] **DCO and GPG key sign each commit :** each commit must be -s and -S signed. An explanation on how to do this is at [Signing Guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md) @@ -253,6 +254,7 @@ body: - [ ] **Push and Create a Pull Request :** Once your issue is resolved, and your commits are signed, and you have a changelog entry, push your changes and create a pull request. Detailed instructions can be found at [Submit PR Training](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/training/workflow/11_submit_pull_request.md), part of [Workflow Training](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers/training/workflow). - [ ] **You did it 🎉:** A maintainer or committer will review your pull request and provide feedback. If approved, we will merge the fix in the main branch. Thanks for being part of the Hiero community as an open-source contributor ❤️ + ***IMPORTANT*** You will ONLY be assigned to the issue if you comment: \assign ***IMPORTANT*** Your pull request CANNOT BE MERGED until you add a changelog entry AND sign your commits each with `git commit -S -s -m "chore: your commit message"` with a GPG key setup. validations: required: true diff --git a/.github/scripts/gfi_notify_team.js b/.github/scripts/archive/gfi_notify_team.js similarity index 98% rename from .github/scripts/gfi_notify_team.js rename to .github/scripts/archive/gfi_notify_team.js index 2acb73720..5711893ef 100644 --- a/.github/scripts/gfi_notify_team.js +++ b/.github/scripts/archive/gfi_notify_team.js @@ -1,4 +1,5 @@ // Script to notify the team when a GFI issue receives its first human comment. +// Replaced by automatic GFI assignment const marker = ''; const TEAM_ALIAS = '@hiero-ledger/hiero-sdk-good-first-issue-support'; diff --git a/.github/scripts/bot-gfi-assign-on-comment.js b/.github/scripts/bot-gfi-assign-on-comment.js index d5cfb4962..299a036c8 100644 --- a/.github/scripts/bot-gfi-assign-on-comment.js +++ b/.github/scripts/bot-gfi-assign-on-comment.js @@ -66,6 +66,21 @@ Once you find one you like, comment \`/assign\` to get started.` ); } +// HELPERS FOR PEOPLE THAT WANT TO BE ASSIGNED BUT DID NOT READ INSTRUCTIONS +const ASSIGN_REMINDER_MARKER = ''; + +function buildAssignReminder(username) { + return `${ASSIGN_REMINDER_MARKER} +👋 Hi @${username}! + +If you’d like to work on this **Good First Issue**, just comment: + +\`\`\` +/assign +\`\`\` + +and you’ll be automatically assigned. Feel free to ask questions here if anything is unclear!`; +} /// START OF SCRIPT /// module.exports = async ({ github, context }) => { @@ -102,6 +117,40 @@ module.exports = async ({ github, context }) => { } if (!commentRequestsAssignment(comment.body)) { + // Only remind if: + // - GFI + // - unassigned + // - reminder not already posted + if ( + issueIsGoodFirstIssue(issue) && + !issue.assignees?.length + ) { + const comments = await github.paginate( + github.rest.issues.listComments, + { + owner, + repo, + issue_number: issue.number, + per_page: 100, + } + ); + + const reminderAlreadyPosted = comments.some(c => + c.body?.includes(ASSIGN_REMINDER_MARKER) + ); + + if (!reminderAlreadyPosted) { + await github.rest.issues.createComment({ + owner, + repo, + issue_number: issue.number, + body: buildAssignReminder(comment.user.login), + }); + + console.log('[gfi-assign] Posted /assign reminder'); + } + } + console.log('[gfi-assign] Exit: comment does not request assignment'); return; } diff --git a/.github/workflows/bot-gfi-notify-team.yml b/.github/workflows/archive/bot-gfi-notify-team.yml similarity index 95% rename from .github/workflows/bot-gfi-notify-team.yml rename to .github/workflows/archive/bot-gfi-notify-team.yml index 2ed9dcf86..4f06782a0 100644 --- a/.github/workflows/bot-gfi-notify-team.yml +++ b/.github/workflows/archive/bot-gfi-notify-team.yml @@ -19,11 +19,10 @@ jobs: 'Good First Issue' ) - concurrency: group: gfi-notify-issue-${{ github.event.issue.number }} cancel-in-progress: false - + steps: - name: Harden the runner uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 @@ -40,4 +39,4 @@ jobs: with: script: | const script = require('./.github/scripts/gfi_notify_team.js'); - await script({ github, context}); \ No newline at end of file + await script({ github, context}); diff --git a/docs/sdk_developers/training/workflow/04_assigning_issues.md b/docs/sdk_developers/training/workflow/04_assigning_issues.md index b7cc6cbe3..c2859246e 100644 --- a/docs/sdk_developers/training/workflow/04_assigning_issues.md +++ b/docs/sdk_developers/training/workflow/04_assigning_issues.md @@ -1,12 +1,14 @@ ## Getting Assigned to an Issue -It is important to be assigned an issue before starting work on it or creating a pull request. +Claim an issue as yours to work on by commenting on a good first issue with exactly: \assign We recommend Good First Issues for developers new to the Python SDK. These are easier and better documented tasks. -To do that, -1. Select a `Good First Issue` that interests you and is not yet assigned at [Python SDK Issues](https://github.com/hiero-ledger/hiero-sdk-python/issues) -2. Write a comment at the bottom of the issue page asking "I want to be assigned to this issue" -3. A maintainer will shortly assign you to the issue +Key steps: +1. Find an available `Good First Issue` that interests you and is not yet assigned at [Python SDK Good First Issues](https://github.com/hiero-ledger/hiero-sdk-python/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22Good%20First%20Issue%22%20no%3Aassignee) +2. Write a comment replying to the issue with: \assign +3. You'll be automatically assigned -Congratulations! You are assigned and can now get started on the work. +Congratulations! You have claimed the issue and can now get started on the work. + +Intermediate and advanced issues require team approval to be assigned.