Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/rethnet/main' into rethnet/imp…
Browse files Browse the repository at this point in the history
…rovement/less-clones
  • Loading branch information
Wodann committed Oct 20, 2023
2 parents 5088ec9 + 0680887 commit a9ad7f6
Show file tree
Hide file tree
Showing 784 changed files with 43,775 additions and 10,386 deletions.
2 changes: 1 addition & 1 deletion .cargo-husky/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Intended to be in sync with .github/workflows/hardhat-core-ci.yml's
# test-rethnet-rs
# test-edr-rs

if [ -z "${ALCHEMY_URL}" ] || [ -z "${INFURA_URL}" ]; then
echo WARNING: skipping remote tests because the ALCHEMY_URL and INFURA_URL environment variables are not defined. Local test results may differ from those in CI.
Expand Down
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*.sol linguist-language=Solidity
# prevent github actions to checkout files with crlf line endings
* text=auto

*.sol text eol=lf
*.d.ts text eol=lf
2 changes: 1 addition & 1 deletion .github/workflows/LATEST_DEPENDENCY_VERSIONS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/setup-node@v2
with:
node-version: 18.15
node-version: 18
- uses: actions/checkout@v2
- name: Delete yarn.lock
run: "rm yarn.lock"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/add-issue-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ jobs:
with:
project-url: https://github.com/orgs/NomicFoundation/projects/4
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: area:edr
label-operator: NOT
1 change: 1 addition & 0 deletions .github/workflows/add-label-to-new-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ 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"
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],
});
}
2 changes: 2 additions & 0 deletions .github/workflows/check-changeset-added.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
check-if-changeset:
name: Check that PR has a changeset
runs-on: ubuntu-latest
# don't run this check in the changesets PR
if: github.head_ref != 'changeset-release/main'
steps:
- uses: actions/github-script@v6
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/check-docs-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Check Docs Site
on:
push:
branches:
- "fr/**"
- "**"
workflow_dispatch:

concurrency:
group: ${{github.workflow}}-${{github.ref}}
Expand All @@ -17,7 +18,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
cache: yarn
- name: Install
run: yarn --frozen-lockfile
Expand All @@ -29,3 +30,5 @@ jobs:
run: cd docs && yarn build
- name: Storybook
run: cd docs && yarn build-storybook
env:
NODE_OPTIONS: --openssl-legacy-provider
2 changes: 1 addition & 1 deletion .github/workflows/comment-on-linter-error.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
ref: "refs/pull/${{ github.event.number }}/merge"
- uses: actions/setup-node@v2
with:
node-version: 18.15
node-version: 18
cache: yarn
- name: Install
run: yarn --frozen-lockfile
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/compile-with-typescript-v4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Compile with typescript v4

on:
push:
branches: main
pull_request:
branches:
- "**"
workflow_dispatch:

jobs:
compile_with_typescript_v4:
name: Compile with typescript v4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18
- name: Install typescript v4 in all packages
run: |
sed -i 's/"typescript": "~5.0.0"/"typescript": "^4.0.0"/' package.json packages/*/package.json && yarn
# hardhat-viem is the only package that requires TypeScript v5
- name: Remove hardhat-viem directory
run: rm -fr packages/hardhat-viem
- name: Remove hardhat-viem from the build script
run: sed -i 's/packages\/hardhat-viem packages\/hardhat-toolbox-viem//' package.json
- name: Build
run: yarn build
Loading

0 comments on commit a9ad7f6

Please sign in to comment.