Skip to content

Commit 905e101

Browse files
fix: remove unrelated changes from GFI label PR
Signed-off-by: Bhuvan Somisetty <somisettybhuvan5@gmail.com>
1 parent d97d972 commit 905e101

14 files changed

Lines changed: 446 additions & 49 deletions

.github/scripts/bot-next-issue-recommendation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module.exports = async ({ github, context, core }) => {
5959
// Determine issue difficulty level
6060
const difficultyLevels = {
6161
beginner: labelSet.has('beginner'),
62-
goodFirstIssue: labelSet.has('Good First Issue'),
62+
goodFirstIssue: labelSet.has('good first issue'),
6363
intermediate: labelSet.has('intermediate'),
6464
advanced: labelSet.has('advanced'),
6565
};
@@ -85,7 +85,7 @@ module.exports = async ({ github, context, core }) => {
8585

8686
if (recommendedIssues.length === 0) {
8787
isFallback = true;
88-
recommendedIssues = await searchIssues(github, core, repoOwner, repoName, 'Good First Issue');
88+
recommendedIssues = await searchIssues(github, core, repoOwner, repoName, 'good first issue');
8989
recommendedLabel = 'Good First Issue';
9090
}
9191

@@ -170,7 +170,7 @@ async function generateAndPostComment(github, context, core, prNumber, recommend
170170
`org:${context.repo.owner}`,
171171
'archived:false',
172172
'no:assignee',
173-
'(label:"Good First Issue" OR label:"skill: Good First Issue")',
173+
'(label:"good first issue" OR label:"skill: good first issue")',
174174
`(${repoQuery})`,
175175
].join(' ');
176176

.github/scripts/coderabbit_plan_trigger.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22

33
const CODERABBIT_MARKER = '<!-- CodeRabbit Plan Trigger -->';
44

5-
async function triggerCodeRabbitPlan(github, owner, repo, issue, marker = CODERABBIT_MARKER, isDryRun = false) {
5+
async function triggerCodeRabbitPlan(github, owner, repo, issue, marker = CODERABBIT_MARKER) {
66
const comment = `${marker} @coderabbitai plan`;
77

8-
if (isDryRun) {
9-
console.log(`[DRY RUN] Would trigger CodeRabbit plan for issue #${issue.number}`);
10-
return true;
11-
}
12-
138
try {
149
await github.rest.issues.createComment({
1510
owner,
@@ -105,11 +100,8 @@ async function main({ github, context }) {
105100
return console.log(`CodeRabbit plan already triggered for #${issue.number}`);
106101
}
107102

108-
// Check for dry run (default to true if not specified, for safety)
109-
const isDryRun = (process.env.DRY_RUN || 'true').toLowerCase() === 'true';
110-
111103
// Post CodeRabbit plan trigger
112-
await triggerCodeRabbitPlan(github, owner, repo, issue, CODERABBIT_MARKER, isDryRun);
104+
await triggerCodeRabbitPlan(github, owner, repo, issue, CODERABBIT_MARKER);
113105

114106
logSummary(owner, repo, issue);
115107
} catch (err) {

.github/workflows/bot-coderabbit-plan-trigger.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@ name: CodeRabbit Plan Trigger
55
on:
66
issues:
77
types: [labeled]
8-
workflow_dispatch:
9-
inputs:
10-
dry_run:
11-
description: "Run without posting comments"
12-
required: false
13-
default: "true"
14-
type: choice
15-
options:
16-
- "true"
17-
- "false"
188

199
permissions:
2010
issues: write
@@ -28,10 +18,9 @@ jobs:
2818
cancel-in-progress: false
2919
# Only run when the newly added label is beginner, intermediate, or advanced (case-insensitive)
3020
if: >
31-
github.event_name == 'workflow_dispatch' ||
32-
(github.event.action == 'labeled' &&
21+
github.event.action == 'labeled' &&
3322
github.event.issue.state == 'open' &&
34-
contains(fromJson('["beginner","intermediate","advanced","Beginner","Intermediate","Advanced"]'), github.event.label.name))
23+
contains(fromJson('["beginner","intermediate","advanced","Beginner","Intermediate","Advanced"]'), github.event.label.name)
3524
3625
steps:
3726
- name: Harden the runner
@@ -45,7 +34,6 @@ jobs:
4534
- name: Trigger CodeRabbit Plan
4635
env:
4736
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48-
DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run || 'false' }}
4937
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 #v9.0.0
5038
with:
5139
script: |

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Harden the runner (Audit all outbound calls)
18-
uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0
18+
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
1919
with:
2020
egress-policy: audit
2121

@@ -62,7 +62,7 @@ jobs:
6262

6363
steps:
6464
- name: Harden the runner (Audit all outbound calls)
65-
uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0
65+
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
6666
with:
6767
egress-policy: audit
6868

docs/sdk_developers/training/workflow/04_assigning_issues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Getting Assigned to an Issue
22

3-
Claim an issue as yours to work on by commenting on a Good First Issue with exactly: /assign
3+
Claim an issue as yours to work on by commenting on a good first issue with exactly: /assign
44

55
We recommend Good First Issues for developers new to the Python SDK. These are easier and better documented tasks.
66

src/hiero_sdk_python/consensus/topic_create_transaction.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
from hiero_sdk_python.account.account_id import AccountId
1313
from hiero_sdk_python.channels import _Channel
14+
from hiero_sdk_python.crypto.key import Key
1415
from hiero_sdk_python.Duration import Duration
1516
from hiero_sdk_python.executable import _Method
1617
from hiero_sdk_python.hapi.services import consensus_create_topic_pb2, transaction_pb2
@@ -19,7 +20,7 @@
1920
)
2021
from hiero_sdk_python.tokens.custom_fixed_fee import CustomFixedFee
2122
from hiero_sdk_python.transaction.transaction import Transaction
22-
from hiero_sdk_python.utils.key_utils import Key, key_to_proto
23+
from hiero_sdk_python.utils.key_utils import key_to_proto
2324

2425

2526
class TopicCreateTransaction(Transaction):

src/hiero_sdk_python/query/transaction_get_receipt_query.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,17 +277,22 @@ def _map_status_error(self, response: response_pb2.Response) -> PrecheckError |
277277
TransactionReceipt._from_proto(response.transactionGetReceipt.receipt, self.transaction_id),
278278
)
279279

280-
def _map_receipt_list(self, receipts: list[transaction_receipt_pb2.TransactionReceipt]) -> list[TransactionReceipt]:
280+
def _map_receipt_list(
281+
self, receipts: list[transaction_receipt_pb2.TransactionReceipt], include_parent_tx_id: bool = False
282+
) -> list[TransactionReceipt]:
281283
"""
282284
Maps a list of protobuf transaction receipts to TransactionReceipt objects.
283285
284286
Args:
285287
receipts: A list of protobuf TransactionReceipt objects
288+
include_parent_tx_id: If True, pass parent transaction_id to mapped receipts (for duplicates).
289+
If False, pass None (for child receipts).
286290
287291
Returns:
288292
A list of TransactionReceipt objects
289293
"""
290-
return [TransactionReceipt._from_proto(receipt_proto, self.transaction_id) for receipt_proto in receipts]
294+
transaction_id = self.transaction_id if include_parent_tx_id else None
295+
return [TransactionReceipt._from_proto(receipt_proto, transaction_id) for receipt_proto in receipts]
291296

292297
def execute(self, client: Client, timeout: int | float | None = None) -> TransactionReceipt:
293298
"""
@@ -315,12 +320,18 @@ def execute(self, client: Client, timeout: int | float | None = None) -> Transac
315320
parent = TransactionReceipt._from_proto(response.transactionGetReceipt.receipt, self.transaction_id)
316321

317322
if self.include_children:
318-
children = self._map_receipt_list(response.transactionGetReceipt.child_transaction_receipts)
323+
# Child receipts are sub-transactions; they don't need parent transaction_id
324+
children = self._map_receipt_list(
325+
response.transactionGetReceipt.child_transaction_receipts, include_parent_tx_id=False
326+
)
319327

320328
parent._set_children(children)
321329

322330
if self.include_duplicates:
323-
duplicates = self._map_receipt_list(response.transactionGetReceipt.duplicateTransactionReceipts)
331+
# Duplicate receipts are related to parent; keep parent transaction_id for context
332+
duplicates = self._map_receipt_list(
333+
response.transactionGetReceipt.duplicateTransactionReceipts, include_parent_tx_id=True
334+
)
324335

325336
parent._set_duplicates(duplicates)
326337

src/hiero_sdk_python/tokens/token_create_transaction.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
from hiero_sdk_python.account.account_id import AccountId
2020
from hiero_sdk_python.channels import _Channel
21+
from hiero_sdk_python.crypto.key import Key
2122
from hiero_sdk_python.Duration import Duration
2223
from hiero_sdk_python.executable import _Method
2324
from hiero_sdk_python.hapi.services import token_create_pb2, transaction_pb2
@@ -29,7 +30,7 @@
2930
from hiero_sdk_python.tokens.supply_type import SupplyType
3031
from hiero_sdk_python.tokens.token_type import TokenType
3132
from hiero_sdk_python.transaction.transaction import Transaction
32-
from hiero_sdk_python.utils.key_utils import Key, key_to_proto
33+
from hiero_sdk_python.utils.key_utils import key_to_proto
3334

3435

3536
AUTO_RENEW_PERIOD = Duration(7890000) # around 90 days in seconds

src/hiero_sdk_python/tokens/token_update_transaction.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
from hiero_sdk_python.account.account_id import AccountId
1616
from hiero_sdk_python.channels import _Channel
17+
from hiero_sdk_python.crypto.key import Key
1718
from hiero_sdk_python.Duration import Duration
1819
from hiero_sdk_python.executable import _Method
1920
from hiero_sdk_python.hapi.services import token_update_pb2, transaction_pb2
@@ -25,7 +26,7 @@
2526
from hiero_sdk_python.tokens.token_id import TokenId
2627
from hiero_sdk_python.tokens.token_key_validation import TokenKeyValidation
2728
from hiero_sdk_python.transaction.transaction import Transaction
28-
from hiero_sdk_python.utils.key_utils import Key, key_to_proto
29+
from hiero_sdk_python.utils.key_utils import key_to_proto
2930

3031

3132
@dataclass

src/hiero_sdk_python/transaction/transaction.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from hiero_sdk_python.account.account_id import AccountId
77
from hiero_sdk_python.client.client import Client
8+
from hiero_sdk_python.crypto.key import Key
89
from hiero_sdk_python.exceptions import PrecheckError
910
from hiero_sdk_python.executable import _Executable, _ExecutionState
1011
from hiero_sdk_python.hapi.services import basic_types_pb2, transaction_contents_pb2, transaction_pb2
@@ -15,7 +16,7 @@
1516
from hiero_sdk_python.transaction.transaction_id import TransactionId
1617
from hiero_sdk_python.transaction.transaction_receipt import TransactionReceipt
1718
from hiero_sdk_python.transaction.transaction_response import TransactionResponse
18-
from hiero_sdk_python.utils.key_utils import Key, key_to_proto
19+
from hiero_sdk_python.utils.key_utils import key_to_proto
1920

2021

2122
if TYPE_CHECKING:

0 commit comments

Comments
 (0)