-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/rethnet/main' into rethnet/imp…
…rovement/less-clones
- Loading branch information
Showing
784 changed files
with
43,775 additions
and
10,386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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], | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.