forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from paradigmxyz/main
[pull] main from paradigmxyz:main
- Loading branch information
Showing
986 changed files
with
54,740 additions
and
30,334 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[codespell] | ||
skip = .git,target,./crates/storage/libmdbx-rs/mdbx-sys/libmdbx,Cargo.toml,Cargo.lock | ||
ignore-words-list = crate,ser,ratatui |
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 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.rs] | ||
max_line_length = 100 | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
|
||
[*.md] | ||
# double whitespace at end of line | ||
# denotes a line break in Markdown | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[] |
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 |
---|---|---|
|
@@ -6,15 +6,15 @@ body: | |
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this bug report! Please provide as much detail as possible. | ||
If you believe you have found a vulnerability, please provide details [here](mailto:[email protected]) instead. | ||
- type: textarea | ||
id: what-happened | ||
attributes: | ||
label: Describe the bug | ||
description: | | ||
A clear and concise description of what the bug is. | ||
If the bug is in a crate you are using (i.e. you are not running the standard `reth` binary) please mention that as well. | ||
validations: | ||
required: true | ||
|
@@ -25,7 +25,7 @@ body: | |
description: Please provide any steps you think might be relevant to reproduce the bug. | ||
placeholder: | | ||
Steps to reproduce: | ||
1. Start '...' | ||
2. Then '...' | ||
3. Check '...' | ||
|
@@ -36,7 +36,14 @@ body: | |
id: logs | ||
attributes: | ||
label: Node logs | ||
description: If applicable, please provide the node logs leading up to the bug. | ||
description: | | ||
If applicable, please provide the node logs leading up to the bug. | ||
**Please also provide debug logs.** By default, these can be found in: | ||
- `~/.cache/reth/logs` on Linux | ||
- `~/Library/Caches/reth/logs` on macOS | ||
- `%localAppData%/reth/logs` on Windows | ||
render: text | ||
validations: | ||
required: false | ||
|
@@ -69,6 +76,13 @@ body: | |
description: This can be obtained with `reth db version` | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: network | ||
attributes: | ||
label: Which chain / network are you on? | ||
description: This is the argument you pass to `reth --chain`. If you are using `--dev`, type in 'dev' here. If you are not running with `--chain` or `--dev` then it is mainnet. | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: node-type | ||
attributes: | ||
|
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ contact_links: | |
about: Please ask and answer questions here to keep the issue tracker clean. | ||
- name: Security | ||
url: mailto:[email protected] | ||
about: Please report security vulnerabilities here. | ||
about: Please report security vulnerabilities here. |
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 was deleted.
Oops, something went wrong.
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,57 @@ | ||
// Filter function for labels we do not want on PRs automatically. | ||
function shouldIncludeLabel (label) { | ||
const isStatus = label.startsWith('S-'); | ||
const isTrackingIssue = label === 'C-tracking-issue'; | ||
const isPreventStale = label === 'M-prevent-stale'; | ||
const isDifficulty = label.startsWith('D-'); | ||
|
||
return !isStatus && !isTrackingIssue && !isPreventStale && !isDifficulty; | ||
} | ||
|
||
// Get the issue number from an issue link in the forms `<keyword> <issue url>` or `<keyword> #<issue number>`. | ||
function getIssueLink (repoUrl, body) { | ||
const urlPattern = new RegExp(`(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) ${repoUrl}/issues/(?<issue_number>\\d+)`, 'i') | ||
const issuePattern = new RegExp(`(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) \#(?<issue_number>\\d+)`, 'i') | ||
|
||
const urlRe = body.match(urlPattern); | ||
const issueRe = body.match(issuePattern); | ||
if (urlRe?.groups?.issue_number) { | ||
return urlRe.groups.issue_number | ||
} else { | ||
return issueRe?.groups?.issue_number | ||
} | ||
} | ||
|
||
module.exports = async ({ github, context }) => { | ||
try { | ||
const prNumber = context.payload.pull_request.number; | ||
const prBody = context.payload.pull_request.body; | ||
const repo = context.repo; | ||
|
||
const repoUrl = context.payload.repository.html_url; | ||
const issueNumber = getIssueLink(repoUrl, prBody); | ||
if (!issueNumber) { | ||
console.log('No issue reference found in PR description.'); | ||
return; | ||
} | ||
|
||
const issue = await github.rest.issues.get({ | ||
...repo, | ||
issue_number: issueNumber, | ||
}); | ||
|
||
const issueLabels = issue.data.labels | ||
.map(label => label.name) | ||
.filter(shouldIncludeLabel); | ||
if (issueLabels.length > 0) { | ||
await github.rest.issues.addLabels({ | ||
...repo, | ||
issue_number: prNumber, | ||
labels: issueLabels, | ||
}); | ||
} | ||
} catch (err) { | ||
console.error('Failed to label PR'); | ||
console.error(err); | ||
} | ||
} |
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
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,23 @@ | ||
name: Label PRs | ||
|
||
on: | ||
pull_request: | ||
types: [opened] | ||
|
||
jobs: | ||
label_prs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Label PRs | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const label_pr = require('./.github/scripts/label_pr.js') | ||
await label_pr({github, context}) |
Oops, something went wrong.