Skip to content

Commit 6ed5e2e

Browse files
authored
Merge branch 'main' into update_token_keys
2 parents 02abbc2 + 3dfa4d3 commit 6ed5e2e

207 files changed

Lines changed: 14420 additions & 1928 deletions

File tree

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Default code owners for entire repository
2-
* @mgarbs
2+
* @hiero-ledger/hiero-improvement-proposals-maintainers
33

44
#########################
55
##### Core Files ######
@@ -8,16 +8,16 @@
88
# NOTE: Must be placed last to ensure enforcement over all other rules
99

1010
# Protection Rules for Github Configuration Files and Actions Workflows
11-
/.github/ @hashgraph/platform-ci @hashgraph/release-engineering-managers
12-
/.github/workflows/ @hashgraph/platform-ci @mgarbs
11+
/.github/ @hiero-ledger/github-maintainers
12+
/.github/workflows/ @hiero-ledger/github-maintainers @hiero-ledger/hiero-improvement-proposals-maintainers
1313

1414
# Self-protection for root CODEOWNERS files (this file should not exist and should definitely require approval)
15-
/CODEOWNERS @hashgraph/release-engineering-managers
15+
/CODEOWNERS @hiero-ledger/github-maintainers
1616

1717
# Protect the repository root files
18-
/README.md @hashgraph/platform-ci @hashgraph/release-engineering-managers
19-
**/LICENSE @hashgraph/release-engineering-managers
18+
/README.md @hiero-ledger/github-maintainers @hiero-ledger/hiero-improvement-proposals-maintainers
19+
**/LICENSE @hiero-ledger/github-maintainers
2020

2121
# Git Ignore definitions
22-
**/.gitignore @hashgraph/platform-ci @hashgraph/release-engineering-managers
23-
**/.gitignore.* @hashgraph/platform-ci @hashgraph/release-engineering-managers
22+
**/.gitignore @hiero-ledger/github-maintainers
23+
**/.gitignore.* @hiero-ledger/github-maintainers

.github/dependabot.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,10 @@ updates:
33
- package-ecosystem: github-actions
44
directory: "/"
55
schedule:
6-
interval: daily
7-
open-pull-requests-limit: 10
6+
interval: weekly
7+
open-pull-requests-limit: 10
8+
- package-ecosystem: npm
9+
directory: "/"
10+
schedule:
11+
interval: weekly
12+
open-pull-requests-limit: 10

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,29 @@ permissions:
1616

1717
jobs:
1818
assign-hip-number:
19-
runs-on: improvement-proposals-linux-medium
19+
runs-on: hiero-improvement-proposals-linux-medium
2020
steps:
2121
- name: Harden Runner
22-
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
22+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2323
with:
2424
egress-policy: audit
2525

26-
- name: Check out the code
27-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
- name: Checkout Code
27+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2828
with:
29+
token: ${{ secrets.GH_ACCESS_TOKEN }}
2930
fetch-depth: 0
3031

32+
- name: Import GPG Key
33+
id: gpg_importer
34+
uses: step-security/ghaction-import-gpg@c86c374c0659a6c2d1284bccf8af889e73ce8fe0 # v6.3.0
35+
with:
36+
git_commit_gpgsign: true
37+
git_tag_gpgsign: true
38+
git_user_signingkey: true
39+
gpg_private_key: ${{ secrets.GPG_KEY_CONTENTS }}
40+
passphrase: ${{ secrets.GPG_KEY_PASSPHRASE }}
41+
3142
- name: Identify if New HIP
3243
id: check-new
3344
run: |
@@ -108,5 +119,5 @@ jobs:
108119
109120
PR_NUMBER=${{ github.event.pull_request.number }}
110121
git add HIP/
111-
git commit -m "Assigning HIP $PR_NUMBER and renaming file to hip-$PR_NUMBER.md"
122+
git commit -sSm "Assigning HIP $PR_NUMBER and renaming file to hip-$PR_NUMBER.md"
112123
git push origin HEAD:${{ github.head_ref }}

.github/workflows/notifications.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ defaults:
1212

1313
jobs:
1414
DispatchNotifications:
15-
runs-on: improvement-proposals-linux-medium
15+
runs-on: hiero-improvement-proposals-linux-medium
1616
steps:
1717
- name: Harden Runner
18-
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
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: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,26 @@ on:
1818
jobs:
1919
check-merged-file:
2020
if: github.event.pull_request.merged == true
21-
runs-on: improvement-proposals-linux-medium
21+
runs-on: hiero-improvement-proposals-linux-medium
2222

2323
steps:
24+
- name: Harden Runner
25+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
26+
with:
27+
egress-policy: audit
28+
2429
- name: Check out the code
25-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
31+
32+
- name: Import GPG Key
33+
id: gpg_importer
34+
uses: step-security/ghaction-import-gpg@c86c374c0659a6c2d1284bccf8af889e73ce8fe0 # v6.3.0
35+
with:
36+
git_commit_gpgsign: true
37+
git_tag_gpgsign: true
38+
git_user_signingkey: true
39+
gpg_private_key: ${{ secrets.GPG_KEY_CONTENTS }}
40+
passphrase: ${{ secrets.GPG_KEY_PASSPHRASE }}
2641

2742
- name: Get modified files
2843
id: get-modified-files
@@ -151,7 +166,7 @@ jobs:
151166
git config --global user.name 'GitHub Action'
152167
git config --global user.email 'action@github.com'
153168
git add .
154-
git commit -m "Update HIP status and set updated date"
169+
git commit -sSm "Update HIP status and set updated date"
155170
git push origin HEAD:status-update-${{ github.sha }}
156171
PR_URL=$(gh pr create --title "Update HIP status" --body "Automatically updating the status of HIPs in Last Call and setting the updated date based on the type and category." --base main --head status-update-${{ github.sha }})
157172
echo "Pull request created at $PR_URL"

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ defaults:
2121

2222
jobs:
2323
StatusChangeNotifications:
24-
runs-on: improvement-proposals-linux-medium
24+
runs-on: hiero-improvement-proposals-linux-medium
2525
steps:
2626
- name: Harden Runner
27-
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
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@25f3b8e2229f3a238679abdbcf82d84a075419bd # v0.1.3
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ defaults:
1919

2020
jobs:
2121
StatusChangeNotifications:
22-
runs-on: improvement-proposals-linux-medium
22+
runs-on: hiero-improvement-proposals-linux-medium
2323
steps:
2424
- name: Harden Runner
25-
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
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@7238bab69680f644f9eab409cec92179d1d2f0ce # v6.0.1
3131
with:
3232
server_address: smtp.gmail.com
3333
server_port: 465

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

Lines changed: 55 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,31 @@ 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:
10-
if: github.ref == 'refs/heads/main' # Only run on main branch
11-
runs-on: improvement-proposals-linux-medium
13+
if: ${{ github.ref == 'refs/heads/main' }} # Only run on main branch
14+
runs-on: hiero-improvement-proposals-linux-medium
1215
permissions:
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 }}
28+
ref: 'main'
2029

2130
- name: Import GPG Key
2231
id: gpg_importer
23-
uses: step-security/ghaction-import-gpg@6c8fe4d0126a59d57c21f87c9ae5dd3451fa3cca # v6.1.0
32+
uses: step-security/ghaction-import-gpg@c86c374c0659a6c2d1284bccf8af889e73ce8fe0 # v6.3.0
2433
with:
2534
git_commit_gpgsign: true
2635
git_tag_gpgsign: true
@@ -29,7 +38,7 @@ jobs:
2938
passphrase: ${{ secrets.GPG_KEY_PASSPHRASE }}
3039

3140
- name: Setup Node.js
32-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
41+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3342
with:
3443
node-version: "20"
3544

@@ -38,6 +47,7 @@ jobs:
3847
mkdir -p _data
3948
cat << 'EOF' > fetch-draft-hips.js
4049
const https = require('https');
50+
const fs = require('fs');
4151
4252
async function makeGraphQLRequest(query, token) {
4353
return new Promise((resolve, reject) => {
@@ -67,7 +77,7 @@ jobs:
6777
async function getAllPRs() {
6878
const query = `
6979
query {
70-
repository(name: "hedera-improvement-proposal", owner: "hashgraph") {
80+
repository(name: "hiero-improvement-proposals", owner: "hiero-ledger") {
7181
pullRequests(first: 100, states: [OPEN], orderBy: {field: CREATED_AT, direction: DESC}) {
7282
nodes {
7383
title
@@ -78,6 +88,7 @@ jobs:
7888
edges {
7989
node {
8090
path
91+
changeType
8192
additions
8293
deletions
8394
}
@@ -97,6 +108,12 @@ jobs:
97108
98109
if (result.errors) {
99110
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);
100117
process.exit(1);
101118
}
102119
@@ -108,11 +125,31 @@ jobs:
108125
}
109126
110127
// Run the main function
111-
getAllPRs().then(prs => {
112-
const fs = require('fs');
113-
fs.writeFileSync('_data/draft_hips.json', JSON.stringify(prs, null, 2));
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+
142+
const outputPath = '_data/draft_hips.json';
143+
144+
if (fs.existsSync(outputPath)) {
145+
console.log(`Removing existing file: ${outputPath}`);
146+
fs.unlinkSync(outputPath);
147+
}
148+
149+
console.log(`Writing ${draftHIPPRs.length} filtered PRs to: ${outputPath}`);
150+
fs.writeFileSync(outputPath, JSON.stringify(draftHIPPRs, null, 2));
114151
}).catch(error => {
115-
console.error('Failed to fetch PRs:', error);
152+
console.error('Failed to fetch and filter PRs:', error);
116153
process.exit(1);
117154
});
118155
EOF
@@ -124,11 +161,15 @@ jobs:
124161

125162
- name: Commit and Push Changes
126163
env:
127-
GITHUB_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
128-
GITHUB_USER_NAME: ${{ secrets.GIT_USER_NAME }}
164+
GITHUB_USER_EMAIL: ${{ vars.GIT_USER_EMAIL }}
165+
GITHUB_USER_NAME: ${{ vars.GIT_USER_NAME }}
129166
run: |
167+
set -e
130168
git config --local user.email "$GITHUB_USER_EMAIL"
131169
git config --local user.name "$GITHUB_USER_NAME"
132170
git add _data/draft_hips.json
133-
git commit -s -S -m "Update draft HIPs data [skip ci]" || echo "No changes to commit"
134-
git push origin main || echo "No changes to push"
171+
git diff --cached --quiet && echo "No changes to commit" && exit 0
172+
173+
git commit -s -S -m "Update draft HIPs data [skip ci]"
174+
git push origin main
175+
set +e

.github/workflows/validateHeaders.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ defaults:
1111

1212
jobs:
1313
ValidateHIP:
14-
runs-on: improvement-proposals-linux-medium
14+
runs-on: hiero-improvement-proposals-linux-medium
1515
steps:
1616
- name: Harden Runner
17-
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
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

2626
- name: Use Node.js
27-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
27+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2828
with:
2929
node-version: "12.x"
3030

@@ -34,6 +34,7 @@ jobs:
3434
- name: Validate HIPs
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
VERTESIA_API_KEY: ${{ secrets.VERTESIA_API_KEY }}
3738
run: |
3839
PR_NUMBER=${{ github.event.pull_request.number }}
3940
REPO=${{ github.repository }}

0 commit comments

Comments
 (0)