forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'update_micropython_v1.20'
- Loading branch information
Showing
1,587 changed files
with
43,538 additions
and
40,821 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
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 |
---|---|---|
|
@@ -7,10 +7,10 @@ assignees: '' | |
|
||
--- | ||
|
||
* Remove all placeholder text before submitting the new issue. | ||
|
||
* If you need to raise this issue privately with the MicroPython team, please email [email protected] instead. | ||
|
||
* Include a clear and concise description of what the security issue is. | ||
|
||
* What does this issue allow an attacker to do? | ||
|
||
* Remove all placeholder text above before submitting. |
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,7 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,105 @@ | ||
name: Code size comment | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Check code size] | ||
types: [completed] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: 'Download artifact' | ||
id: download-artifact | ||
uses: actions/github-script@v6 | ||
with: | ||
result-encoding: string | ||
script: | | ||
const fs = require('fs'); | ||
const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
run_id: context.payload.workflow_run.id, | ||
}); | ||
const matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { | ||
return artifact.name == "code-size-report" | ||
}); | ||
if (matchArtifact.length === 0) { | ||
console.log('no matching artifact found'); | ||
console.log('result: "skip"'); | ||
return 'skip'; | ||
} | ||
const download = await github.rest.actions.downloadArtifact({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
artifact_id: matchArtifact[0].id, | ||
archive_format: 'zip', | ||
}); | ||
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/code-size-report.zip`, Buffer.from(download.data)); | ||
console.log('artifact downloaded to `code-size-report.zip`'); | ||
console.log('result: "ok"'); | ||
return 'ok'; | ||
- name: 'Unzip artifact' | ||
if: steps.download-artifact.outputs.result == 'ok' | ||
run: unzip code-size-report.zip | ||
- name: Post comment to pull request | ||
if: steps.download-artifact.outputs.result == 'ok' | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
const fs = require('fs'); | ||
const prNumber = Number(fs.readFileSync('pr_number')); | ||
const codeSizeReport = `Code size report: | ||
\`\`\` | ||
${fs.readFileSync('diff')} | ||
\`\`\` | ||
`; | ||
const comments = await github.paginate( | ||
github.rest.issues.listComments, | ||
{ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: prNumber, | ||
} | ||
); | ||
comments.reverse(); | ||
const previousComment = comments.find(comment => | ||
comment.user.login === 'github-actions[bot]' | ||
) | ||
// if github-actions[bot] already made a comment, update it, | ||
// otherwise create a new comment. | ||
if (previousComment) { | ||
await github.rest.issues.updateComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
comment_id: previousComment.id, | ||
body: codeSizeReport, | ||
}); | ||
} else { | ||
await github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: prNumber, | ||
body: codeSizeReport, | ||
}); | ||
} |
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,13 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: codeformat | ||
name: MicroPython codeformat.py for changed files | ||
entry: tools/codeformat.py -v -f | ||
language: python | ||
- id: verifygitlog | ||
name: MicroPython git commit message format checker | ||
entry: tools/verifygitlog.py --check-file --ignore-rebase | ||
language: python | ||
verbose: true | ||
stages: [commit-msg] |
Oops, something went wrong.