You've already forked library-registry
mirror of
https://github.com/arduino/library-registry.git
synced 2025-07-02 23:02:27 +03:00
Merge pull request #1 from per1234/development
Set up automated Library Manager submission system
This commit is contained in:
5
.github/.markdown-link-check.json
vendored
Normal file
5
.github/.markdown-link-check.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"retryOn429": true,
|
||||
"retryCount": 3,
|
||||
"aliveStatusCodes": [200, 206]
|
||||
}
|
61
.github/.markdownlint.yml
vendored
Normal file
61
.github/.markdownlint.yml
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
# See: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
|
||||
# The code style defined in this file is the official standardized style to be used in all Arduino projects and should
|
||||
# not be modified.
|
||||
# Note: Rules disabled solely because they are redundant to Prettier are marked with a "Prettier" comment.
|
||||
|
||||
default: false
|
||||
MD001: false
|
||||
MD002: false
|
||||
MD003: false # Prettier
|
||||
MD004: false # Prettier
|
||||
MD005: false # Prettier
|
||||
MD006: false # Prettier
|
||||
MD007: false # Prettier
|
||||
MD008: false # Prettier
|
||||
MD009:
|
||||
br_spaces: 0
|
||||
strict: true
|
||||
list_item_empty_lines: false # Prettier
|
||||
MD010: false # Prettier
|
||||
MD011: true
|
||||
MD012: false # Prettier
|
||||
MD013: false
|
||||
MD014: false
|
||||
MD018: true
|
||||
MD019: false # Prettier
|
||||
MD020: true
|
||||
MD021: false # Prettier
|
||||
MD022: false # Prettier
|
||||
MD023: false # Prettier
|
||||
MD024: false
|
||||
MD025:
|
||||
level: 1
|
||||
front_matter_title: '^\s*"?title"?\s*[:=]'
|
||||
MD026: false
|
||||
MD027: false # Prettier
|
||||
MD028: false
|
||||
MD029:
|
||||
style: one
|
||||
MD030:
|
||||
ul_single: 1
|
||||
ol_single: 1
|
||||
ul_multi: 1
|
||||
ol_multi: 1
|
||||
MD031: false # Prettier
|
||||
MD032: false # Prettier
|
||||
MD033: false
|
||||
MD034: false
|
||||
MD035: false # Prettier
|
||||
MD036: false
|
||||
MD037: true
|
||||
MD038: true
|
||||
MD039: true
|
||||
MD040: false
|
||||
MD041: false
|
||||
MD042: true
|
||||
MD043: false
|
||||
MD044: false
|
||||
MD045: true
|
||||
MD046:
|
||||
style: fenced
|
||||
MD047: false # Prettier
|
60
.github/workflows/check-license.yml
vendored
Normal file
60
.github/workflows/check-license.yml
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
name: Check license
|
||||
|
||||
env:
|
||||
EXPECTED_LICENSE_FILENAME: LICENSE.txt
|
||||
# SPDX identifier: https://spdx.org/licenses/
|
||||
EXPECTED_LICENSE_TYPE: CC0-1.0
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/check-license.yml"
|
||||
# Recognized license files. See: https://github.com/licensee/licensee/blob/master/docs/what-we-look-at.md#detecting-the-license-file
|
||||
- "[cC][oO][pP][yY][iI][nN][gG]*"
|
||||
- "[cC][oO][pP][yY][rR][iI][gG][hH][tH]*"
|
||||
- "[lL][iI][cC][eE][nN][cCsS][eE]*"
|
||||
- "[oO][fF][lL]*"
|
||||
- "[pP][aA][tT][eE][nN][tT][sS]*"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/check-license.yml"
|
||||
- "[cC][oO][pP][yY][iI][nN][gG]*"
|
||||
- "[cC][oO][pP][yY][rR][iI][gG][hH][tH]*"
|
||||
- "[lL][iI][cC][eE][nN][cCsS][eE]*"
|
||||
- "[oO][fF][lL]*"
|
||||
- "[pP][aA][tT][eE][nN][tT][sS]*"
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout local repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ruby # Install latest version
|
||||
|
||||
- name: Install licensee
|
||||
run: gem install licensee
|
||||
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/licensing-a-repository
|
||||
- name: Check license file
|
||||
run: |
|
||||
# See: https://github.com/licensee/licensee
|
||||
LICENSEE_OUTPUT="$(licensee detect --json --confidence=100)"
|
||||
|
||||
DETECTED_LICENSE_FILE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].filename | tr --delete '\r')"
|
||||
echo "Detected license file: $DETECTED_LICENSE_FILE"
|
||||
if [ "$DETECTED_LICENSE_FILE" != "\"$EXPECTED_LICENSE_FILENAME\"" ]; then
|
||||
echo "ERROR: detected license file doesn't match expected: $EXPECTED_LICENSE_FILENAME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DETECTED_LICENSE_TYPE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].matched_license | tr --delete '\r')"
|
||||
echo "Detected license type: $DETECTED_LICENSE_TYPE"
|
||||
if [ "$DETECTED_LICENSE_TYPE" != "\"$EXPECTED_LICENSE_TYPE\"" ]; then
|
||||
echo "ERROR: detected license type doesn't match expected $EXPECTED_LICENSE_TYPE"
|
||||
exit 1
|
||||
fi
|
67
.github/workflows/check-markdown.yml
vendored
Normal file
67
.github/workflows/check-markdown.yml
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
name: Check Markdown
|
||||
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/check-markdown.yml"
|
||||
- ".github/.markdown-link-check.json"
|
||||
- "**/.markdownlint*"
|
||||
- "**.md"
|
||||
- "**.mdx"
|
||||
- "**.mkdn"
|
||||
- "**.mdown"
|
||||
- "**.markdown"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/check-markdown.yml"
|
||||
- ".github/.markdown-link-check.json"
|
||||
- "**/.markdownlint*"
|
||||
- "**.md"
|
||||
- "**.mdx"
|
||||
- "**.mkdn"
|
||||
- "**.mdown"
|
||||
- "**.markdown"
|
||||
schedule:
|
||||
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to markdownlint.
|
||||
- cron: "0 8 * * TUE"
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Initialize markdownlint-cli problem matcher
|
||||
uses: xt0rted/markdownlint-problem-matcher@v1
|
||||
|
||||
- name: Install markdownlint-cli
|
||||
run: sudo npm install --global markdownlint-cli
|
||||
|
||||
- name: Run markdownlint
|
||||
run: markdownlint --config "${{ github.workspace }}/.github/.markdownlint.yml" "**/*.md"
|
||||
|
||||
links:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Determine whether only modified files should be checked
|
||||
id: check-modified
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo "::set-output name=value::yes"
|
||||
|
||||
- name: Check links
|
||||
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||
with:
|
||||
config-file: .github/.markdown-link-check.json
|
||||
use-quiet-mode: "yes"
|
||||
check-modified-files-only: ${{ steps.check-modified.outputs.value }}
|
||||
base-branch: ${{ github.base_ref }}
|
224
.github/workflows/check-prettier-formatting.yml
vendored
Normal file
224
.github/workflows/check-prettier-formatting.yml
vendored
Normal file
@ -0,0 +1,224 @@
|
||||
name: Check Prettier Formatting
|
||||
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/check-prettier-formatting.yml"
|
||||
- "**/.prettierignore"
|
||||
- "**/.prettierrc*"
|
||||
# CSS
|
||||
- "**.css"
|
||||
- "**.wxss"
|
||||
# PostCSS
|
||||
- "**.pcss"
|
||||
- "**.postcss"
|
||||
# Less
|
||||
- "**.less"
|
||||
# SCSS
|
||||
- "**.scss"
|
||||
# GraphQL
|
||||
- "**.graphqls?"
|
||||
- "**.gql"
|
||||
# handlebars
|
||||
- "**.handlebars"
|
||||
- "**.hbs"
|
||||
# HTML
|
||||
- "**.mjml"
|
||||
- "**.html?"
|
||||
- "**.html.hl"
|
||||
- "**.st"
|
||||
- "**.xht"
|
||||
- "**.xhtml"
|
||||
# Vue
|
||||
- "**.vue"
|
||||
# JavaScript
|
||||
- "**.flow"
|
||||
- "**._?jsb?"
|
||||
- "**.bones"
|
||||
- "**.cjs"
|
||||
- "**.es6?"
|
||||
- "**.frag"
|
||||
- "**.gs"
|
||||
- "**.jake"
|
||||
- "**.jscad"
|
||||
- "**.jsfl"
|
||||
- "**.js[ms]"
|
||||
- "**.[mn]js"
|
||||
- "**.pac"
|
||||
- "**.wxs"
|
||||
- "**.[xs]s?js"
|
||||
- "**.xsjslib"
|
||||
# JSX
|
||||
- "**.jsx"
|
||||
# TypeScript
|
||||
- "**.ts"
|
||||
# TSX
|
||||
- "**.tsx"
|
||||
# JSON
|
||||
- "**/.eslintrc"
|
||||
- "**.json"
|
||||
- "**.avsc"
|
||||
- "**.geojson"
|
||||
- "**.gltf"
|
||||
- "**.har"
|
||||
- "**.ice"
|
||||
- "**.JSON-tmLanguage"
|
||||
- "**.mcmeta"
|
||||
- "**.tfstate"
|
||||
- "**.topojson"
|
||||
- "**.webapp"
|
||||
- "**.webmanifest"
|
||||
- "**.yyp?"
|
||||
# JSONC
|
||||
- "**/.babelrc"
|
||||
- "**/.jscsrc"
|
||||
- "**/.js[hl]intrc"
|
||||
- "**.jsonc"
|
||||
- "**.sublime-*"
|
||||
# JSON5
|
||||
- "**.json5"
|
||||
# Markdown
|
||||
- "**.mdx?"
|
||||
- "**.markdown"
|
||||
- "**.mk?down"
|
||||
- "**.mdwn"
|
||||
- "**.mkdn?"
|
||||
- "**.ronn"
|
||||
- "**.workbook"
|
||||
# YAML
|
||||
- "**/.clang-format"
|
||||
- "**/.clang-tidy"
|
||||
- "**/.gemrc"
|
||||
- "**/glide.lock"
|
||||
- "**.yml"
|
||||
- "**.mir"
|
||||
- "**.reek"
|
||||
- "**.rviz"
|
||||
- "**.sublime-syntax"
|
||||
- "**.syntax"
|
||||
- "**.yaml"
|
||||
- "**.yaml-tmlanguage"
|
||||
- "**.yaml.sed"
|
||||
- "**.yml.mysql"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/check-prettier-formatting.yml"
|
||||
- "**/.prettierignore"
|
||||
- "**/.prettierrc*"
|
||||
# CSS
|
||||
- "**.css"
|
||||
- "**.wxss"
|
||||
# PostCSS
|
||||
- "**.pcss"
|
||||
- "**.postcss"
|
||||
# Less
|
||||
- "**.less"
|
||||
# SCSS
|
||||
- "**.scss"
|
||||
# GraphQL
|
||||
- "**.graphqls?"
|
||||
- "**.gql"
|
||||
# handlebars
|
||||
- "**.handlebars"
|
||||
- "**.hbs"
|
||||
# HTML
|
||||
- "**.mjml"
|
||||
- "**.html?"
|
||||
- "**.html.hl"
|
||||
- "**.st"
|
||||
- "**.xht"
|
||||
- "**.xhtml"
|
||||
# Vue
|
||||
- "**.vue"
|
||||
# JavaScript
|
||||
- "**.flow"
|
||||
- "**._?jsb?"
|
||||
- "**.bones"
|
||||
- "**.cjs"
|
||||
- "**.es6?"
|
||||
- "**.frag"
|
||||
- "**.gs"
|
||||
- "**.jake"
|
||||
- "**.jscad"
|
||||
- "**.jsfl"
|
||||
- "**.js[ms]"
|
||||
- "**.[mn]js"
|
||||
- "**.pac"
|
||||
- "**.wxs"
|
||||
- "**.[xs]s?js"
|
||||
- "**.xsjslib"
|
||||
# JSX
|
||||
- "**.jsx"
|
||||
# TypeScript
|
||||
- "**.ts"
|
||||
# TSX
|
||||
- "**.tsx"
|
||||
# JSON
|
||||
- "**/.eslintrc"
|
||||
- "**.json"
|
||||
- "**.avsc"
|
||||
- "**.geojson"
|
||||
- "**.gltf"
|
||||
- "**.har"
|
||||
- "**.ice"
|
||||
- "**.JSON-tmLanguage"
|
||||
- "**.mcmeta"
|
||||
- "**.tfstate"
|
||||
- "**.topojson"
|
||||
- "**.webapp"
|
||||
- "**.webmanifest"
|
||||
- "**.yyp?"
|
||||
# JSONC
|
||||
- "**/.babelrc"
|
||||
- "**/.jscsrc"
|
||||
- "**/.js[hl]intrc"
|
||||
- "**.jsonc"
|
||||
- "**.sublime-*"
|
||||
# JSON5
|
||||
- "**.json5"
|
||||
# Markdown
|
||||
- "**.mdx?"
|
||||
- "**.markdown"
|
||||
- "**.mk?down"
|
||||
- "**.mdwn"
|
||||
- "**.mkdn?"
|
||||
- "**.ronn"
|
||||
- "**.workbook"
|
||||
# YAML
|
||||
- "**/.clang-format"
|
||||
- "**/.clang-tidy"
|
||||
- "**/.gemrc"
|
||||
- "**/glide.lock"
|
||||
- "**.yml"
|
||||
- "**.mir"
|
||||
- "**.reek"
|
||||
- "**.rviz"
|
||||
- "**.sublime-syntax"
|
||||
- "**.syntax"
|
||||
- "**.yaml"
|
||||
- "**.yaml-tmlanguage"
|
||||
- "**.yaml.sed"
|
||||
- "**.yml.mysql"
|
||||
schedule:
|
||||
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to Prettier.
|
||||
- cron: "0 8 * * TUE"
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Prettier
|
||||
run: sudo npm install --global prettier
|
||||
|
||||
- name: Format with Prettier
|
||||
run: prettier --write .
|
||||
|
||||
- name: Check formatting
|
||||
run: git diff --color --exit-code
|
328
.github/workflows/manage-prs.yml
vendored
Normal file
328
.github/workflows/manage-prs.yml
vendored
Normal file
@ -0,0 +1,328 @@
|
||||
name: Manage PRs
|
||||
|
||||
env:
|
||||
SUBMISSION_PARSER_VERSION: 1.0.0-rc2 # See: https://github.com/arduino/library-manager-submission-parser/releases
|
||||
|
||||
on:
|
||||
# pull_request_target trigger is used instead of pull_request so the token will have the write permissions needed to comment and merge.
|
||||
# Note that this means the version of the workflow from the PR base ref will be used as opposed to the head ref, as is the case with pull_request triggered workflows.
|
||||
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- ready_for_review
|
||||
- synchronize
|
||||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
- edited
|
||||
|
||||
jobs:
|
||||
enabled:
|
||||
if: >
|
||||
github.event_name == 'pull_request_target' ||
|
||||
(
|
||||
github.event_name == 'issue_comment' &&
|
||||
github.event.issue.pull_request != '' &&
|
||||
github.event.issue.state == 'open' &&
|
||||
contains(github.event.comment.body, 'ArduinoBot')
|
||||
)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dummy step to make job valid
|
||||
run: ""
|
||||
diff:
|
||||
needs:
|
||||
- enabled
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
artifact: ${{ steps.configuration.outputs.artifact }}
|
||||
path: ${{ steps.configuration.outputs.path }}
|
||||
filename: ${{ steps.configuration.outputs.filename }}
|
||||
|
||||
steps:
|
||||
- name: Set configuration outputs
|
||||
id: configuration
|
||||
run: |
|
||||
echo "::set-output name=artifact::diff"
|
||||
echo "::set-output name=path::${{ runner.temp }}"
|
||||
echo "::set-output name=filename::diff.txt"
|
||||
|
||||
- name: Get PR diff
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# It's necessary to reference both pull_request.number and issue.number because only one of the two are defined depending on whether the workflow is triggered by PR or comment event.
|
||||
curl \
|
||||
--fail \
|
||||
--output "${{ steps.configuration.outputs.path }}/${{ steps.configuration.outputs.filename }}" \
|
||||
--header "Authorization: token $GITHUB_TOKEN" \
|
||||
--header "Accept: application/vnd.github.v3.diff" \
|
||||
https://api.github.com/repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/pulls/${{ github.event.pull_request.number }}${{ github.event.issue.number }}
|
||||
|
||||
- name: Upload diff file to workflow artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
path: ${{ steps.configuration.outputs.path }}/${{ steps.configuration.outputs.filename }}
|
||||
name: ${{ steps.configuration.outputs.artifact }}
|
||||
|
||||
parse:
|
||||
needs:
|
||||
- enabled
|
||||
- diff
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
type: ${{ steps.parse-request.outputs.type }}
|
||||
submissions: ${{ steps.parse-request.outputs.submissions }}
|
||||
index-entry: ${{ steps.parse-request.outputs.index-entry }}
|
||||
|
||||
steps:
|
||||
- name: Checkout local repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Download submission parser
|
||||
id: download-parser
|
||||
uses: carlosperate/download-file-action@v1.0.3
|
||||
with:
|
||||
file-url: https://github.com/arduino/library-registry-submission-parser/releases/download/${{ env.SUBMISSION_PARSER_VERSION }}/parser
|
||||
location: ${{ runner.temp }}
|
||||
|
||||
- name: Download diff
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: ${{ needs.diff.outputs.path }}
|
||||
name: ${{ needs.diff.outputs.artifact }}
|
||||
|
||||
- name: Parse request
|
||||
id: parse-request
|
||||
run: |
|
||||
chmod u+x "${{ steps.download-parser.outputs.file-path }}"
|
||||
REQUEST="$("${{ steps.download-parser.outputs.file-path }}" --diffpath="${{ needs.diff.outputs.path }}/${{ needs.diff.outputs.filename }}" --repopath="${{ github.workspace }}" --listname="repositories.txt")"
|
||||
# Due to limitations of the GitHub Actions workflow system, dedicated outputs must be created for use in certain workflow fields.
|
||||
echo "::set-output name=type::$(echo "$REQUEST" | jq -r -c '.type')"
|
||||
echo "::set-output name=submissions::$(echo "$REQUEST" | jq -c '.submissions')"
|
||||
echo "::set-output name=index-entry::$(echo "$REQUEST" | jq -r -c '.indexEntry')"
|
||||
|
||||
label:
|
||||
needs:
|
||||
- enabled
|
||||
- parse
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Label PR
|
||||
uses: octokit/request-action@v2.x
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
route: PUT /repos/{owner}/{repo}/issues/{issue_number}/labels
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
issue_number: ${{ github.event.pull_request.number }}${{ github.event.issue.number }}
|
||||
labels: |
|
||||
- ${{ needs.parse.outputs.type }}
|
||||
|
||||
check-submissions:
|
||||
needs:
|
||||
- enabled
|
||||
- parse
|
||||
if: needs.parse.outputs.type == 'submission'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
# A matrix job will run for each of the submission URLs
|
||||
matrix:
|
||||
submission: ${{ fromJson(needs.parse.outputs.submissions) }}
|
||||
|
||||
steps:
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
echo "REPORT_PATH=${{ runner.temp }}/report.json" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Comment on error detected while parsing submission
|
||||
if: matrix.submission.error != ''
|
||||
uses: octokit/request-action@v2.x
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
# NOTE: "Unexpected input(s) ..." warnings for the arbitrary octokit/request-action inputs are normal and expected.
|
||||
route: POST /repos/{owner}/{repo}/issues/{issue_number}/comments
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
issue_number: ${{ github.event.pull_request.number }}${{ github.event.issue.number }}
|
||||
body: |
|
||||
|
|
||||
A problem was found with your submission ${{ matrix.submission.submissionURL }}
|
||||
|
||||
${{ matrix.submission.error }}
|
||||
|
||||
- name: Fail on error detected while parsing
|
||||
if: matrix.submission.error != ''
|
||||
run: |
|
||||
echo "::error::Error found with submission"
|
||||
exit 1
|
||||
|
||||
- name: Clone submission
|
||||
run: git clone --branch ${{ matrix.submission.tag }} --depth 1 ${{ matrix.submission.normalizedURL }} "${{ matrix.submission.name }}"
|
||||
|
||||
- name: Lint submission
|
||||
id: arduino-lint
|
||||
uses: arduino/arduino-lint-action@v1
|
||||
continue-on-error: true # Continue the job so the report can be commented to the PR
|
||||
with:
|
||||
library-manager: submit
|
||||
project-type: library
|
||||
compliance: permissive
|
||||
official: ${{ matrix.submission.official }}
|
||||
path: ${{ matrix.submission.name }}
|
||||
report-file: ${{ env.REPORT_PATH }}
|
||||
|
||||
- name: Read Arduino Lint report
|
||||
id: read-lint-report
|
||||
run: |
|
||||
echo "::set-output name=report::$(jq -c . "${{ env.REPORT_PATH }}")"
|
||||
|
||||
- name: Comment on Arduino Lint warning
|
||||
if: fromJson(steps.read-lint-report.outputs.report).summary.warningCount > 0 && fromJson(steps.read-lint-report.outputs.report).summary.errorCount == 0
|
||||
uses: octokit/request-action@v2.x
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/issues/{issue_number}/comments
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
issue_number: ${{ github.event.pull_request.number }}${{ github.event.issue.number }}
|
||||
body: |
|
||||
|
|
||||
[Arduino Lint](https://github.com/arduino/arduino-lint) has suggestions for possible improvements to ${{ matrix.submission.submissionURL }}:
|
||||
|
||||
```json
|
||||
${{ toJson(fromJson(steps.read-lint-report.outputs.report).projects) }}
|
||||
```
|
||||
|
||||
- name: Comment on Arduino Lint error
|
||||
if: fromJson(steps.read-lint-report.outputs.report).summary.errorCount > 0
|
||||
uses: octokit/request-action@v2.x
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/issues/{issue_number}/comments
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
issue_number: ${{ github.event.pull_request.number }}${{ github.event.issue.number }}
|
||||
body: |
|
||||
|
|
||||
[Arduino Lint](https://github.com/arduino/arduino-lint) found errors with ${{ matrix.submission.submissionURL }}:
|
||||
|
||||
```json
|
||||
${{ toJson(fromJson(steps.read-lint-report.outputs.report).projects) }}
|
||||
```
|
||||
|
||||
- name: Fail on Arduino Lint error
|
||||
if: steps.arduino-lint.outcome == 'failure'
|
||||
run: |
|
||||
echo "::error::Arduino Lint detected an error"
|
||||
exit 1
|
||||
|
||||
check-submissions-fail:
|
||||
needs:
|
||||
- enabled
|
||||
- check-submissions
|
||||
if: failure() # This job will only run if the submission checks failed
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Comment instructions to fix errors detected during submission checks
|
||||
uses: octokit/request-action@v2.x
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/issues/{issue_number}/comments
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
issue_number: ${{ github.event.pull_request.number }}${{ github.event.issue.number }}
|
||||
body: |
|
||||
|
|
||||
Thanks for your interest in contributing to the Arduino Library Manager index @${{ github.actor }}
|
||||
Please resolve the error(s) mentioned in the previous comment.
|
||||
|
||||
After resolving the issue, trigger this check again by doing one of the following:
|
||||
|
||||
- Commit the required change to the branch you submitted this pull request from.
|
||||
- Comment here, mentioning @ArduinoBot in the comment
|
||||
|
||||
More information: https://github.com/${{ github.repository }}/blob/main/README.md#if-the-problem-is-with-the-pull-request"
|
||||
|
||||
merge:
|
||||
needs:
|
||||
- enabled
|
||||
- parse
|
||||
- check-submissions
|
||||
if: success() # This job will only run if the submission checks passed
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Merge pull request
|
||||
uses: octokit/request-action@v2.x
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
route: PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
pull_number: ${{ github.event.pull_request.number }}${{ github.event.issue.number }}
|
||||
|
||||
- name: Checkout index source branch
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: production
|
||||
|
||||
- name: Add index source file entry for submissions
|
||||
run: |
|
||||
INDEX_SOURCE_FILE_PATH="${{ github.workspace }}/repositories.txt"
|
||||
git config --global user.email "bot@arduino.cc"
|
||||
git config --global user.name "ArduinoBot"
|
||||
echo "${{ needs.parse.outputs.index-entry }}" >> "$INDEX_SOURCE_FILE_PATH"
|
||||
git add --update "$INDEX_SOURCE_FILE_PATH"
|
||||
echo -e "Add submission # ${{ github.event.pull_request.number }}${{ github.event.issue.number }}\n\n${{ github.event.repository.html_url }}/pull/${{ github.event.pull_request.number }}${{ github.event.issue.number }}" | git commit --file -
|
||||
git push
|
||||
|
||||
request-review:
|
||||
needs:
|
||||
- enabled
|
||||
- parse
|
||||
if: needs.parse.outputs.type != 'submission' # These request types can't be automatically approved.
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Request pull request review
|
||||
uses: octokit/request-action@v2.x
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
pull_number: ${{ github.event.pull_request.number }}${{ github.event.issue.number }}
|
||||
team_reviewers: |
|
||||
- arduino/team_tooling
|
||||
|
||||
- name: Comment on required review
|
||||
uses: octokit/request-action@v2.x
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/issues/{issue_number}/comments
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
issue_number: ${{ github.event.pull_request.number }}${{ github.event.issue.number }}
|
||||
body: |
|
||||
|
|
||||
Hi @${{ github.actor }}. Your pull request has been detected as something other than a Library Manager submission. A maintainer will need to review it before it can be merged.
|
||||
|
||||
If you intended to submit a library, please check the instructions and update your pull request if necessary:
|
||||
https://github.com/${{ github.repository }}/blob/main/README.md#instructions
|
32
.github/workflows/spell-check.yml
vendored
Normal file
32
.github/workflows/spell-check.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Spell Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "repositories.txt"
|
||||
push:
|
||||
paths-ignore:
|
||||
- "repositories.txt"
|
||||
schedule:
|
||||
# Run every Tuesday at 03:00 UTC to catch breakage caused by updates to the dictionary
|
||||
- cron: "0 3 * * 2"
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
spellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Spell check
|
||||
uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
|
||||
ignore_words_list:
|
||||
builtin: clear,informal,en-GB_to_en-US
|
||||
check_filenames: true
|
||||
check_hidden: true
|
||||
skip: ./.git,./repositories.txt
|
121
LICENSE.txt
Normal file
121
LICENSE.txt
Normal file
@ -0,0 +1,121 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
82
README.md
Normal file
82
README.md
Normal file
@ -0,0 +1,82 @@
|
||||
# Arduino Library Manager list
|
||||
|
||||
This repository contains the list of libraries in the
|
||||
[Arduino Library Manager](https://www.arduino.cc/en/guide/libraries#toc3) index.
|
||||
|
||||
## Adding a library to Library Manager
|
||||
|
||||
If you would like to have your library available for installation via Library Manager, just submit a
|
||||
[pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) that
|
||||
adds the repository URL to [the list](repositories.txt). You are welcome to add multiple libraries at once.
|
||||
|
||||
See the instructions below for detailed instructions on how to do this via the GitHub web interface.
|
||||
|
||||
### Instructions
|
||||
|
||||
1. You may want to first take a look at
|
||||
[the requirements for admission into the Arduino Library Manager index](https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ).
|
||||
Each submission will be checked for compliance before being accepted.
|
||||
1. Open this link to [fork](https://guides.github.com/activities/forking/) this repository and edit the list via the
|
||||
GitHub web interface: https://github.com/arduino/library-manager-list/edit/main/repositories.txt
|
||||
1. Add the library repository's URL to the list. This should be the URL of the repository home page. For example:
|
||||
`https://github.com/arduino-libraries/Servo`.
|
||||
1. At the bottom of the page, select the radio button next to "Create a new branch for this commit and start a pull
|
||||
request."
|
||||
1. Click the "Propose changes" button.
|
||||
1. In the "Open a pull request" window that opens, click the "Create pull request" button.
|
||||
|
||||
The library will be automatically checked for compliance as soon as the pull request is submitted. If no problems were
|
||||
found, the pull request will be immediately merged and the library will be available for installation via Library
|
||||
Manager within a day's time.
|
||||
|
||||
If any problems are found, a bot will comment on the pull request to tell you what is wrong. The problem may be either
|
||||
with your pull request or with the library.
|
||||
|
||||
#### If the problem is with the pull request:
|
||||
|
||||
Edit the file in the
|
||||
[branch](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-branches) you submitted the
|
||||
pull request from in your fork of the `arduino/library-manager-list` repository, then commit.
|
||||
|
||||
Doing this will update the pull request and cause the automated checks to run again.
|
||||
|
||||
#### If the problem is with the library:
|
||||
|
||||
1. Make the necessary fix in the library repository.
|
||||
1. Increment the `version` value in the library's
|
||||
[library.properties file](https://arduino.github.io/arduino-cli/latest/library-specification/#library-metadata).
|
||||
1. Create a [release](https://docs.github.com/en/github/administering-a-repository/managing-releases-in-a-repository) or
|
||||
[tag](https://git-scm.com/docs/git-tag). The Library Manager index always uses tagged versions of the libraries, so
|
||||
even if the development version of the library is compliant, it can't be accepted until the latest release or tag is
|
||||
compliant. Alternatively, you can redo the existing release/tag if you prefer.
|
||||
1. Comment on your pull request here in the `arduino/library-manager-list` repository, mentioning **@ArduinoBot** in the
|
||||
comment. Doing this will cause the automated check to run again.
|
||||
|
||||
## Changing the URL of a library already in Library Manager
|
||||
|
||||
Submit a pull request that changes the URL as desired in [repositories.txt](repositories.txt). This can be done by
|
||||
following [the instructions above](#instructions).
|
||||
|
||||
Since this type of request must be reviewed by a human maintainer, please write an explanation in the pull request
|
||||
description, making it clear that the URL is intentionally being changed.
|
||||
|
||||
## Removing the URL of a library already in Library Manager
|
||||
|
||||
Submit a pull request that removes the URL from [repositories.txt](repositories.txt). This can be done by following
|
||||
[the instructions above](#instructions).
|
||||
|
||||
Since this type of request must be reviewed by a human maintainer, please write an explanation in the pull request
|
||||
description, making it clear that the URL is intentionally being removed.
|
||||
|
||||
## Report a problem with Library Manager
|
||||
|
||||
Please first take a look at
|
||||
[the Arduino Library Manager FAQ](https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ). If a library release is
|
||||
missing from Library Manager, it is usually because it was not compliant with all the requirements listed in that
|
||||
document.
|
||||
|
||||
This repository is not an appropriate place to request support or report problems with a library. Check the library's
|
||||
own documentation for instructions or ask on the [Arduino Forum](https://forum.arduino.cc/).
|
||||
|
||||
If the problem is about something else, please make an issue report here:
|
||||
https://github.com/arduino/library-manager-list/issues?q=is%3Aissue
|
3628
repositories.txt
Normal file
3628
repositories.txt
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user