Skip to content

Commit 407ad0e

Browse files
authored
Merge branch 'hiero-ledger:main' into custom-fee-detector
2 parents fd75ffd + d123afa commit 407ad0e

82 files changed

Lines changed: 5407 additions & 1447 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/add-hip-number.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ jobs:
1919
runs-on: hiero-improvement-proposals-linux-medium
2020
steps:
2121
- name: Harden Runner
22-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
22+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2323
with:
2424
egress-policy: audit
2525

2626
- name: Checkout Code
27-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2828
with:
2929
token: ${{ secrets.GH_ACCESS_TOKEN }}
3030
fetch-depth: 0
3131

3232
- name: Import GPG Key
3333
id: gpg_importer
34-
uses: step-security/ghaction-import-gpg@6c8fe4d0126a59d57c21f87c9ae5dd3451fa3cca # v6.1.0
34+
uses: step-security/ghaction-import-gpg@c86c374c0659a6c2d1284bccf8af889e73ce8fe0 # v6.3.0
3535
with:
3636
git_commit_gpgsign: true
3737
git_tag_gpgsign: true

.github/workflows/notifications.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
runs-on: hiero-improvement-proposals-linux-medium
1616
steps:
1717
- name: Harden Runner
18-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
18+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
1919
with:
2020
egress-policy: audit
2121

2222
- name: Check out repository code
23-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2424
with:
2525
fetch-depth: 0
2626

.github/workflows/schedule-last-call-date-end.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ jobs:
2222

2323
steps:
2424
- name: Harden Runner
25-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
25+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2626
with:
2727
egress-policy: audit
2828

2929
- name: Check out the code
30-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3131

3232
- name: Import GPG Key
3333
id: gpg_importer
34-
uses: step-security/ghaction-import-gpg@6c8fe4d0126a59d57c21f87c9ae5dd3451fa3cca # v6.1.0
34+
uses: step-security/ghaction-import-gpg@c86c374c0659a6c2d1284bccf8af889e73ce8fe0 # v6.3.0
3535
with:
3636
git_commit_gpgsign: true
3737
git_tag_gpgsign: true

.github/workflows/send-discord-message.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
runs-on: hiero-improvement-proposals-linux-medium
2525
steps:
2626
- name: Harden Runner
27-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
27+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2828
with:
2929
egress-policy: audit
3030

3131
- name: Discord notification
3232
env:
3333
DISCORD_WEBHOOK: ${{ secrets.DISCORD }}
34-
uses: step-security/action-discord@5e8cd69d2f322a15430c4d13a97659b58031d207 # v0.1.1
34+
uses: step-security/action-discord@b4bb54a2ec8218130ee588d2ca1fa358cf828735 # v0.1.2
3535
with:
3636
args: "${{ github.event.inputs.filename }} moved into ${{ github.event.inputs.status }} status https://hips.hedera.com/hip/${{ github.event.inputs.filename }}"

.github/workflows/send-email.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222
runs-on: hiero-improvement-proposals-linux-medium
2323
steps:
2424
- name: Harden Runner
25-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
25+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2626
with:
2727
egress-policy: audit
2828

2929
- name: Send mail
30-
uses: step-security/action-send-mail@a995831af980a0a14953f75efec85509f5315e25 # v3.12.0
30+
uses: step-security/action-send-mail@f9e512c47357357965cea1dd9ed04fef3cb835de # v6.0.0
3131
with:
3232
server_address: smtp.gmail.com
3333
server_port: 465

.github/workflows/update-draft-hips.yml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- cron: "0 */6 * * *" # Runs every 6 hours
66
workflow_dispatch: # Allows manual triggering
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
update-draft-hips:
1013
if: ${{ github.ref == 'refs/heads/main' }} # Only run on main branch
@@ -13,15 +16,20 @@ jobs:
1316
contents: write
1417
pull-requests: read
1518
steps:
19+
- name: Harden the runner (Audit all outbound calls)
20+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
21+
with:
22+
egress-policy: audit
23+
1624
- name: Checkout Code
17-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1826
with:
1927
token: ${{ secrets.GH_ACCESS_TOKEN }}
2028
ref: 'main'
2129

2230
- name: Import GPG Key
2331
id: gpg_importer
24-
uses: step-security/ghaction-import-gpg@6c8fe4d0126a59d57c21f87c9ae5dd3451fa3cca # v6.1.0
32+
uses: step-security/ghaction-import-gpg@c86c374c0659a6c2d1284bccf8af889e73ce8fe0 # v6.3.0
2533
with:
2634
git_commit_gpgsign: true
2735
git_tag_gpgsign: true
@@ -80,6 +88,7 @@ jobs:
8088
edges {
8189
node {
8290
path
91+
changeType
8392
additions
8493
deletions
8594
}
@@ -99,6 +108,12 @@ jobs:
99108
100109
if (result.errors) {
101110
console.error('GraphQL errors:', result.errors);
111+
process.exit(1);
112+
}
113+
114+
// Check if data and the expected path to nodes exist
115+
if (!result.data || !result.data.repository || !result.data.repository.pullRequests || !result.data.repository.pullRequests.nodes) {
116+
console.error('Unexpected GraphQL response structure:', result);
102117
process.exit(1);
103118
}
104119
@@ -110,21 +125,31 @@ jobs:
110125
}
111126
112127
// Run the main function
113-
getAllPRs().then(prs => {
114-
// Ensure we're completely replacing the file by writing fresh data
115-
// If the file exists, it will be overwritten entirely
128+
getAllPRs().then(allPRs => {
129+
const draftHIPPRs = allPRs.filter(pr => {
130+
if (!pr.files || !pr.files.edges) {
131+
return false;
132+
}
133+
const hipFiles = pr.files.edges.filter(edge => {
134+
const fileNode = edge.node;
135+
const isNewHIPFile = /^HIP\/hip-[a-zA-Z0-9-]+\.md$/.test(fileNode.path);
136+
return fileNode.changeType === 'ADDED' && isNewHIPFile;
137+
}).map(edge => edge.node);
138+
139+
return hipFiles.length > 0;
140+
});
141+
116142
const outputPath = '_data/draft_hips.json';
117143
118-
// Remove the file if it exists (optional, as writeFileSync will overwrite it anyway)
119144
if (fs.existsSync(outputPath)) {
120145
console.log(`Removing existing file: ${outputPath}`);
121146
fs.unlinkSync(outputPath);
122147
}
123148
124-
console.log(`Writing fresh data to: ${outputPath}`);
125-
fs.writeFileSync(outputPath, JSON.stringify(prs, null, 2));
149+
console.log(`Writing ${draftHIPPRs.length} filtered PRs to: ${outputPath}`);
150+
fs.writeFileSync(outputPath, JSON.stringify(draftHIPPRs, null, 2));
126151
}).catch(error => {
127-
console.error('Failed to fetch PRs:', error);
152+
console.error('Failed to fetch and filter PRs:', error);
128153
process.exit(1);
129154
});
130155
EOF

.github/workflows/validateHeaders.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
runs-on: hiero-improvement-proposals-linux-medium
1515
steps:
1616
- name: Harden Runner
17-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
17+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
1818
with:
1919
egress-policy: audit
2020

2121
- name: Check out repository code
22-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2323
with:
2424
fetch-depth: 0
2525

0 commit comments

Comments
 (0)