Add splitTestsCompilation solidity setting (7): Typechain updates
#1717
This file contains hidden or 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
| name: PR autoassignment | |
| on: | |
| pull_request_target: | |
| types: [opened] | |
| jobs: | |
| assign-new-issue: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| // each user has a chance of (p - (previousP ?? 0)) to be assigned | |
| const potentialAssignees = [ | |
| ["kanej", 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"); | |
| } | |
| // Within the Github API PRs are issue objects | |
| const pr = await github.rest.issues.get({ | |
| owner: context.issue.owner, | |
| repo: context.issue.repo, | |
| issue_number: context.issue.number | |
| }); | |
| const isCollaborator = ["OWNER", "MEMBER", "COLLABORATOR"].includes(pr.data.author_association) | |
| // we only assign PRs 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], | |
| }); | |
| } |