Skip to content

compare confix:bug compile #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 119 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
fac1221
"hardhat": patch
Dargon789 Jan 27, 2024
21729dc
Added support for Typed objects
Dargon789 Feb 22, 2024
5ec17b1
Create SECURITY.md
Dargon789 Mar 26, 2024
952d3d0
Bump the npm_and_yarn group across 3 directories with 11 updates
dependabot[bot] Apr 11, 2024
8acfabf
Delete SECURITY.md
Dargon789 Jun 2, 2024
acc48fc
Merge pull request #5 from Dargon789/dependabot/npm_and_yarn/docs/npm…
Dargon789 Jun 2, 2024
e7801cf
Bump the npm_and_yarn group across 1 directory with 2 updates
dependabot[bot] Jun 18, 2024
7cfd0ae
Merge pull request #7 from Dargon789/dependabot/npm_and_yarn/docs/npm…
Dargon789 Jul 4, 2024
28baf2c
Create SECURITY.md
Dargon789 Jul 4, 2024
cc9d92b
Create jekyll-gh-pages.yml
Dargon789 Jul 4, 2024
f8cc6d1
Create codeql.yml
Dargon789 Aug 17, 2024
d478d75
Create apisec-scan.yml
Dargon789 Aug 17, 2024
b51ba9a
Create eslint.yml
Dargon789 Aug 17, 2024
9fbc379
azure-pipelines nodejs
Dargon789 Aug 18, 2024
42e0190
azure-pipelines
Dargon789 Aug 29, 2024
4388d8d
Bump webpack in /docs in the npm_and_yarn group across 1 directory (#8)
dependabot[bot] Oct 20, 2024
5746198
Bump the npm_and_yarn group across 1 directory with 6 updates (#9)
dependabot[bot] Oct 20, 2024
2f0fe7b
Bump body-parser in /docs in the npm_and_yarn group across 1 director…
dependabot[bot] Oct 20, 2024
e87f452
Fix code scanning alert no. 21: Incomplete multi-character sanitization
Dargon789 Oct 20, 2024
61a3322
Update issue templates
Dargon789 Oct 20, 2024
e7a2e24
Fix code scanning alert no. 21: Incomplete multi-character sanitizati…
Dargon789 Oct 27, 2024
7f69cce
Create defender-for-devops.yml
Dargon789 Oct 27, 2024
1986d11
Create sonarcloud.yml
Dargon789 Oct 27, 2024
d36f046
Bump elliptic in /docs in the npm_and_yarn group across 1 directory (…
dependabot[bot] Nov 3, 2024
c184f57
Bump nanoid in /docs in the npm_and_yarn group across 1 directory (#14)
dependabot[bot] Mar 7, 2025
b98984b
Bump the npm_and_yarn group across 1 directory with 4 updates (#20)
dependabot[bot] Mar 8, 2025
d7da6af
feat: upgrade @typescript-eslint/utils from 5.62.0 to 8.21.0 (#15)
Dargon789 Mar 8, 2025
1566fae
feat: upgrade fs-extra from 7.0.1 to 11.3.0 (#19)
Dargon789 Mar 8, 2025
2a79c77
Delete .github/workflows/azure-pipelines.yml (#21)
Dargon789 Mar 9, 2025
5d652dc
feat: upgrade chalk from 2.4.2 to 5.4.1 (#18)
Dargon789 Mar 9, 2025
d00d170
fix: upgrade @ledgerhq/hw-app-eth from 6.33.6 to 6.42.3 (#16)
Dargon789 Mar 9, 2025
9204ad7
feat: upgrade semver from 6.3.1 to 7.7.1 (#23)
Dargon789 Mar 9, 2025
2c480f4
feat: upgrade fs-extra from 7.0.1 to 11.3.0 (#24)
Dargon789 Mar 9, 2025
daf296a
feat: upgrade ora from 5.4.1 to 8.2.0 (#25)
Dargon789 Mar 9, 2025
284f58d
fix: upgrade @ledgerhq/hw-app-eth from 6.42.3 to 6.42.5 (#26)
Dargon789 Mar 9, 2025
4d706f2
fix: upgrade @nomicfoundation/ethereumjs-util from 9.0.2 to 9.0.4 (#27)
Dargon789 Mar 9, 2025
11aed8b
Circleci project setup (#33)
Dargon789 Mar 9, 2025
f260425
Circleci project setup (#34)
Dargon789 Mar 9, 2025
e62afb9
Update hardhat-viem-ci.yml
Dargon789 Mar 10, 2025
90e5311
Update release.yml (#35)
Dargon789 Mar 10, 2025
3301756
feat: upgrade solhint from 3.6.2 to 5.0.5 (#36)
Dargon789 Mar 10, 2025
2ba9ed8
feat: upgrade abitype from 0.9.10 to 1.0.8 (#37)
Dargon789 Mar 10, 2025
f4c3882
Create npm-publish-github-packages.yml (#40)
Dargon789 Mar 10, 2025
28d1fb3
Create snyk-security.yml (#41)
Dargon789 Mar 10, 2025
66d097c
Create google.yml (#43)
Dargon789 Mar 10, 2025
a3652f3
feat: upgrade fs-extra from 7.0.1 to 11.3.0 (#42)
Dargon789 Mar 11, 2025
09d7173
update yarn corepack v.1.20.22 to 4.7.0 sdk
Dargon789 Mar 11, 2025
9ab023b
feat: upgrade chalk from 2.4.2 to 5.4.1 (#53)
Dargon789 Mar 12, 2025
a308717
Updated config.yml
Dargon789 Mar 12, 2025
e904d1a
Delete .github/workflows/sonarcloud.yml
Dargon789 Mar 12, 2025
328801f
Delete .github/workflows/apisec-scan.yml
Dargon789 Mar 12, 2025
5572818
Delete .github/workflows/check-docs-site.yml
Dargon789 Mar 12, 2025
d8f4aa5
Delete .github/workflows/snyk-security.yml
Dargon789 Mar 12, 2025
7c8ecc2
Delete .github/workflows/compile-with-typescript-v4.yml
Dargon789 Mar 12, 2025
b2aa4ce
Delete .github/workflows/add-issue-to-project.yml
Dargon789 Mar 12, 2025
753cfcb
feat: upgrade cbor from 8.1.0 to 10.0.3 (#57)
snyk-io[bot] Mar 12, 2025
9fb578a
Delete .github/workflows/release.yml
Dargon789 Mar 12, 2025
afd783a
Delete .nvmrc
Dargon789 Mar 12, 2025
61c6eab
Delete azure-pipelines.yml
Dargon789 Mar 12, 2025
45886f5
feat: upgrade semver from 6.3.1 to 7.7.1 (#55)
snyk-io[bot] Mar 12, 2025
4d7c673
feat: upgrade undici from 5.28.5 to 7.3.0 (#54)
snyk-io[bot] Mar 12, 2025
fa80229
feat: upgrade chai-as-promised from 7.1.2 to 8.0.1 (#52)
snyk-io[bot] Mar 12, 2025
46ded04
feat: upgrade @types/chai from 4.3.20 to 5.0.1 (#51)
snyk-io[bot] Mar 12, 2025
3d4797b
feat: upgrade fs-extra from 7.0.1 to 11.3.0 (#49)
snyk-io[bot] Mar 12, 2025
884444e
[submodule "counter/lib/forge-std"]
Dargon789 Mar 13, 2025
f8a99c3
Delete .github/workflows/defender-for-devops.yml
Dargon789 Mar 13, 2025
6ae2a43
Delete .github/workflows/eslint.yml
Dargon789 Mar 13, 2025
0186962
Delete .github/workflows/e2e-tests.yml
Dargon789 Mar 13, 2025
50ba622
Revert "feat: upgrade fs-extra from 7.0.1 to 11.3.0 (#49)" (#58)
Dargon789 Mar 13, 2025
0b0a151
feat: upgrade react from 17.0.2 to 19.0.0 (#64)
Dargon789 Mar 14, 2025
4b27639
feat: upgrade next from 14.2.21 to 15.1.7 (#66)
Dargon789 Mar 14, 2025
1d1c6a6
Delete .github/workflows/codeql.yml
Dargon789 Mar 14, 2025
a0d522f
feat: upgrade undici from 5.28.5 to 7.3.0 (#67)
Dargon789 Mar 14, 2025
03c6926
feat: upgrade chalk from 2.4.2 to 5.4.1 (#63)
Dargon789 Mar 14, 2025
128c79b
feat: upgrade @types/chai-as-promised from 7.1.8 to 8.0.1 (#71)
Dargon789 Mar 14, 2025
6bc2be1
feat: upgrade deep-eql from 4.1.4 to 5.0.2 (#70)
Dargon789 Mar 14, 2025
0df29ba
feat: upgrade io-ts from 1.10.4 to 2.2.22 (#76)
Dargon789 Mar 16, 2025
2c028c0
feat: upgrade env-paths from 2.2.1 to 3.0.0 (#75)
snyk-io[bot] Mar 16, 2025
721306f
feat: upgrade semver from 6.3.1 to 7.7.1 (#59)
snyk-io[bot] Mar 19, 2025
04b6738
feat: upgrade fs-extra from 7.0.1 to 11.3.0 (#60)
Dargon789 Mar 19, 2025
1988082
feat: upgrade chai from 4.5.0 to 5.2.0 (#61)
Dargon789 Mar 19, 2025
be1b39a
feat: upgrade chai from 4.5.0 to 5.2.0 (#78)
snyk-io[bot] Mar 19, 2025
2fc9887
feat: upgrade fs-extra from 7.0.1 to 11.3.0 (#77)
snyk-io[bot] Mar 19, 2025
2d48a81
fix: upgrade @ledgerhq/hw-app-eth from 6.42.5 to 6.42.6 (#74)
snyk-io[bot] Mar 19, 2025
4006722
feat: upgrade io-ts from 1.10.4 to 2.2.22 (#73)
snyk-io[bot] Mar 19, 2025
1981815
feat: upgrade chai-as-promised from 7.1.2 to 8.0.1 (#72)
snyk-io[bot] Mar 19, 2025
6ffd450
fix: upgrade @docsearch/react from 3.0.0 to 3.9.0 (#84)
Dargon789 Mar 20, 2025
b8dc2c3
feat: upgrade @types/chai from 4.3.20 to 5.0.1 (#79)
Dargon789 Mar 20, 2025
373a524
feat: upgrade linaria from 2.3.1 to 6.2.0 (#82)
Dargon789 Mar 20, 2025
9345b4f
Update package.json
Dargon789 Mar 20, 2025
33617ad
feat: upgrade react-dom from 17.0.2 to 19.0.0 (#80)
Dargon789 Mar 22, 2025
fa2d60f
fix: upgrade @ledgerhq/hw-app-eth from 6.42.6 to 6.42.8 (#87)
snyk-io[bot] Mar 23, 2025
646b311
build(deps): bump the npm_and_yarn group across 1 directory with 4 up…
dependabot[bot] Mar 23, 2025
45f6cbf
fix: upgrade ts-node from 10.8.0 to 10.9.2 (#92)
Dargon789 Mar 28, 2025
dc4fe47
feat: upgrade next-mdx-remote from 4.0.2 to 5.0.0 (#89)
Dargon789 Mar 28, 2025
99f92de
feat: upgrade hastscript from 7.0.2 to 9.0.1 (#91)
Dargon789 Mar 28, 2025
d15e579
feat: upgrade glob from 8.0.1 to 11.0.1 (#88)
Dargon789 Mar 28, 2025
5e49216
feat: upgrade remark-gfm from 3.0.1 to 4.0.1 (#97)
snyk-io[bot] Mar 29, 2025
631d853
fix: upgrade @callstack/react-theme-provider from 3.0.7 to 3.0.9 (#96)
snyk-io[bot] Mar 29, 2025
2841b9b
feat: upgrade unist-util-visit from 4.1.0 to 5.0.0 (#94)
snyk-io[bot] Mar 29, 2025
7c162eb
feat: upgrade remark-directive from 2.0.1 to 4.0.0 (#101)
Dargon789 Apr 11, 2025
aef773b
[Snyk] Upgrade remark-unwrap-images from 3.0.1 to 4.0.1 (#102)
Dargon789 Apr 11, 2025
6d140a6
fix: upgrade @ledgerhq/hw-app-eth from 6.42.8 to 6.42.9 (#99)
snyk-io[bot] Apr 11, 2025
f673d70
build(deps): bump next (#98) (#105)
Dargon789 Apr 11, 2025
74e9cba
Update check-changeset-added.yml (#106)
Dargon789 Apr 11, 2025
ab28993
[Snyk] Upgrade sanitize-html from 2.13.1 to 2.15.0 (#103)
Dargon789 Apr 11, 2025
9969acc
fix: upgrade rehype-prism from 2.1.2 to 2.3.3
snyk-io[bot] Apr 12, 2025
6ae3881
fix: upgrade @ledgerhq/hw-app-eth from 6.42.9 to 6.43.0 (#109)
snyk-io[bot] Apr 16, 2025
a918a8a
Merge branch 'main' into snyk-upgrade-c4115a7ea9991200af1f5ff078e36a8f
Dargon789 Apr 16, 2025
b7e8233
Merge pull request #108 from Dargon789/snyk-upgrade-c4115a7ea9991200a…
Dargon789 Apr 16, 2025
d8d0021
fix: upgrade undici from 7.5.0 to 7.6.0
snyk-bot Apr 17, 2025
1b16dd3
Merge pull request #111 from Dargon789/snyk-upgrade-15a54fee1a933e0c7…
Dargon789 Apr 18, 2025
5be6fd6
fix: upgrade @ledgerhq/hw-app-eth from 6.43.0 to 6.43.1
snyk-io[bot] Apr 19, 2025
14d0940
fix: upgrade react-dom from 19.0.0 to 19.1.0
snyk-bot Apr 24, 2025
66e9317
Create summary.yml
Dargon789 Apr 27, 2025
c45ac99
Create nuxtjs.yml
Dargon789 Apr 27, 2025
51884da
fix: upgrade @ledgerhq/hw-app-eth from 6.43.1 to 6.44.0
snyk-io[bot] Apr 26, 2025
3ddd7b9
Create puppet-lint.yml
Dargon789 Apr 27, 2025
9514a0e
fix: upgrade react from 19.0.0 to 19.1.0
snyk-io[bot] Apr 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/beige-ladybugs-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Added a notification when a new Hardhat version is available
5 changes: 5 additions & 0 deletions .changeset/bright-onions-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nomicfoundation/hardhat-chai-matchers": patch
---

Added support for Typed objects (thanks @RenanSouza2!)
7 changes: 7 additions & 0 deletions .changeset/curvy-cherries-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@nomicfoundation/hardhat-chai-matchers": patch
"hardhat": patch
"@nomicfoundation/hardhat-viem": patch
---

Improved loading performance
5 changes: 5 additions & 0 deletions .changeset/dry-pianos-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Fixed a bug during project initialization when using yarn or pnpm
5 changes: 5 additions & 0 deletions .changeset/modern-fishes-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Added a fix to prevent submitting transactions with 0 priority fee (thanks @itsdevbear!)
5 changes: 5 additions & 0 deletions .changeset/twelve-mails-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nomicfoundation/hardhat-verify": patch
---

Added support for programmatic verification in Sourcify
25 changes: 25 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/configuration-reference
version: 2.1
executors:
my-custom-executor:
docker:
- image: cimg/base:stable
auth:
# ensure you have first added these secrets
# visit app.circleci.com/settings/project/github/Dargon789/hardhat-project/environment-variables
username: $DOCKER_HUB_USER
password: $DOCKER_HUB_PASSWORD
jobs:
web3-defi-game-project-:

executor: my-custom-executor
steps:
- checkout
- run: |
# echo Hello, World!

workflows:
my-custom-workflow:
jobs:
- web3-defi-game-project-
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Hardhat + EDR",
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "16" /* Keep in sync with the oldest version of Node.js that Hardhat supports */
},
"ghcr.io/devcontainers/features/rust:1": {
"version": "1.70" /* Keep in sync with rust-toolchain */,
"profile": "default"
}
},
/* libudev-dev is required by hardhat-ledger. pkg-config is required by EDR to use OpenSSL */
"postCreateCommand": "sudo apt update && sudo apt install -y libudev-dev pkg-config"
}
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Describe the bug** A clear and concise description of what the bug is.

**To Reproduce** Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior** A clear and concise description of what you expected to happen.

**Screenshots** If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context** Add any other context about the problem here.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ""
labels: ""
assignees: ""
---
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like** A clear and concise description of what you want to happen.

**Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered.

**Additional context** Add any other context or screenshots about the feature request here.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/other-issue.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
name: Other issue
about: Other kind of issue. Please don't use this to ask questions.
title: ""
labels: ""
assignees: ""
---
22 changes: 13 additions & 9 deletions .github/workflows/LATEST_DEPENDENCY_VERSIONS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,32 @@ on:
workflow_dispatch:

jobs:
test-without-yarn-lock:
name: Test without yarn.lock
test-without-pnpm-lock-yaml:
name: Test without pnpm-lock.yaml
strategy:
matrix:
system: ["ubuntu-latest", "windows-latest"]
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v2
with:
node-version: 14
- uses: actions/checkout@v2
- name: Delete yarn.lock
run: "rm yarn.lock"
node-version: 16
cache: "pnpm"
- name: Delete pnpm-lock.yaml
run: "rm pnpm-lock.yaml"
- name: Install
run: yarn
run: pnpm install --no-frozen-lockfile
- name: List dependencies
run: yarn list
run: pnpm list -r --depth 2
- name: Run tests
env:
DO_NOT_SET_THIS_ENV_VAR____IS_HARDHAT_CI: true
FORCE_COLOR: 3
run: yarn test || (echo "===== Retry =====" && yarn test)
run: pnpm test || (echo "===== Retry =====" && pnpm test)
- name: Notify failures
if: failure()
uses: slackapi/[email protected]
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/add-issue-to-project.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .github/workflows/add-label-to-new-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ jobs:
);

if (statusLabel === undefined) {
console.log("Author association:", issue.data.author_association);
const isCollaborator = ["OWNER", "MEMBER", "COLLABORATOR"].includes(issue.data.author_association)
const label = isCollaborator ? "status:ready" : "status:triaging"

await github.rest.issues.addLabels({
owner: context.issue.owner,
repo: context.issue.repo,
issue_number: context.issue.number,
labels: ["status:triaging"]
labels: [label]
});
} else {
console.log(`Issue already has a status: ${statusLabel.name}`);
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/autoassign-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Issue autoassignment

on:
issues:
types: [opened]

jobs:
assign-new-issue:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@v6
with:
script: |
// each user has a chance of (p - (previousP ?? 0)) to be assigned
const potentialAssignees = [
["fvictorio", 0.5],
["schaable", 0.75],
["ChristopherDedominici", 1.0],
];

let assignee;
const r = Math.random();
console.log("r:", r);
for (const [username, p] of potentialAssignees) {
if (r < p) {
assignee = username;
break;
}
}

if (assignee === undefined) {
throw new Error("An assignee should've been set");
}

console.log("assignee:", assignee);

console.log("Fetch issue", context.issue.number);
const issue = await github.rest.issues.get({
owner: context.issue.owner,
repo: context.issue.repo,
issue_number: context.issue.number,
});

console.log("Author association:", issue.data.author_association);
const isCollaborator = ["OWNER", "MEMBER", "COLLABORATOR"].includes(
issue.data.author_association
);
console.log("Is collaborator?", isCollaborator);

// we only assign triage issues from external users
if (!isCollaborator) {
await github.rest.issues.addAssignees({
owner: context.issue.owner,
repo: context.issue.repo,
issue_number: context.issue.number,
assignees: [assignee],
});
}
90 changes: 53 additions & 37 deletions .github/workflows/check-changeset-added.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,57 @@ on:
- unlabeled

jobs:
check-if-changeset:
name: Check that PR has a changeset
runs-on: ubuntu-latest
test:
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: ['18.x', '20.x']
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/github-script@v6
with:
script: |
const pullNumber = context.issue.number;

const { data: files } = await github.rest.pulls.listFiles({
...context.issue,
pull_number: pullNumber
});
const changeset = files.find(
file => file.status === "added" && file.filename.startsWith(".changeset/")
);
if (changeset !== undefined) {
console.log("Changeset found:", changeset.filename);
return;
}

console.log("No changeset found");


const { data: pull } = await github.rest.pulls.get({
...context.issue,
pull_number: pullNumber
});
const noChangesetNeededLabel = pull.labels
.some(l => l.name === "no changeset needed");
if (noChangesetNeededLabel) {
console.log('The PR is labeled as "no changeset needed"');
return;
}

console.log('The PR is not labeled as "no changeset needed"');

process.exit(1);
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}

- name: npm install, build and test
run: |
npm install
npm run build --if-present
npm test
if: github.event_name == 'push'

env: |

const pullNumber = context.issue.number;

const { data: files } = await github.rest.pulls.listFiles({
...context.issue,
pull_number: pullNumber
});
const changeset = files.find(
file => file.status === "added" && file.filename.startsWith(".changeset/")
);
if (changeset) {
console.log("Changeset found:", changeset.filename);
return;
}

console.log("No changeset found");

const { data: pull } = await github.rest.pulls.get({
...context.issue,
pull_number: pullNumber
});
const noChangesetNeededLabel = pull.labels
.some(l => l.name === "no changeset needed");
if (noChangesetNeededLabel) {
console.log('The PR is labeled as "no changeset needed"');
return;
}

console.error('Error: No changeset file found and no "no changeset needed" label applied.');
console.error('Please add a changeset file or label the PR as "no changeset needed".');
process.exit(1);
Loading