Skip to content

Commit e1d572d

Browse files
authored
Merge pull request #9 from arduino/format-yaml
Reduce excessive line lengths in YAML files
2 parents 800f26f + d96fcc4 commit e1d572d

File tree

4 files changed

+44
-14
lines changed

4 files changed

+44
-14
lines changed

.github/workflows/check-license.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ on:
99
push:
1010
paths:
1111
- ".github/workflows/check-license.yml"
12-
# Recognized license files. See: https://github.com/licensee/licensee/blob/master/docs/what-we-look-at.md#detecting-the-license-file
12+
# Recognized license files.
13+
# See: https://github.com/licensee/licensee/blob/master/docs/what-we-look-at.md#detecting-the-license-file
1314
- "[cC][oO][pP][yY][iI][nN][gG]*"
1415
- "[cC][oO][pP][yY][rR][iI][gG][hH][tH]*"
1516
- "[lL][iI][cC][eE][nN][cCsS][eE]*"

.github/workflows/check-toc.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ jobs:
3939
run: sudo npm install --global markdown-toc
4040

4141
- name: Rebuild ToC
42-
run: markdown-toc --bullets=- --maxdepth=${{ matrix.file.maxdepth }} -i "${{ github.workspace }}/${{ matrix.file.name }}"
42+
run: |
43+
markdown-toc \
44+
--bullets=- \
45+
--maxdepth=${{ matrix.file.maxdepth }} \
46+
-i \
47+
"${{ github.workspace }}/${{ matrix.file.name }}"
4348
4449
- name: Check ToC
4550
run: git diff --color --exit-code

.github/workflows/manage-prs.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ env:
44
SUBMISSION_PARSER_VERSION: 1.0.0-rc2 # See: https://github.com/arduino/library-manager-submission-parser/releases
55

66
on:
7-
# pull_request_target trigger is used instead of pull_request so the token will have the write permissions needed to comment and merge.
8-
# 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.
7+
# pull_request_target trigger is used instead of pull_request so the token will have the write permissions needed to
8+
# comment and merge.
9+
# 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
10+
# the case with pull_request triggered workflows.
911
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target
1012
pull_request_target:
1113
types:
@@ -53,7 +55,8 @@ jobs:
5355
env:
5456
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5557
run: |
56-
# 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.
58+
# It's necessary to reference both pull_request.number and issue.number because only one of the two are
59+
# defined depending on whether the workflow is triggered by PR or comment event.
5760
curl \
5861
--fail \
5962
--output "${{ steps.configuration.outputs.path }}/${{ steps.configuration.outputs.filename }}" \
@@ -99,8 +102,14 @@ jobs:
99102
id: parse-request
100103
run: |
101104
chmod u+x "${{ steps.download-parser.outputs.file-path }}"
102-
REQUEST="$("${{ steps.download-parser.outputs.file-path }}" --diffpath="${{ needs.diff.outputs.path }}/${{ needs.diff.outputs.filename }}" --repopath="${{ github.workspace }}" --listname="repositories.txt")"
103-
# Due to limitations of the GitHub Actions workflow system, dedicated outputs must be created for use in certain workflow fields.
105+
REQUEST="$( \
106+
"${{ steps.download-parser.outputs.file-path }}" \
107+
--diffpath="${{ needs.diff.outputs.path }}/${{ needs.diff.outputs.filename }}" \
108+
--repopath="${{ github.workspace }}" \
109+
--listname="repositories.txt" \
110+
)"
111+
# Due to limitations of the GitHub Actions workflow system, dedicated outputs must be created for use in
112+
# certain workflow fields.
104113
echo "::set-output name=type::$(echo "$REQUEST" | jq -r -c '.type')"
105114
echo "::set-output name=submissions::$(echo "$REQUEST" | jq -c '.submissions')"
106115
echo "::set-output name=index-entry::$(echo "$REQUEST" | jq -r -c '.indexEntry')"
@@ -150,7 +159,8 @@ jobs:
150159
env:
151160
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152161
with:
153-
# NOTE: "Unexpected input(s) ..." warnings for the arbitrary octokit/request-action inputs are normal and expected.
162+
# NOTE: "Unexpected input(s) ..." warnings for the arbitrary octokit/request-action inputs are normal and
163+
# expected.
154164
route: POST /repos/{owner}/{repo}/issues/{issue_number}/comments
155165
owner: ${{ github.repository_owner }}
156166
repo: ${{ github.event.repository.name }}
@@ -168,7 +178,11 @@ jobs:
168178
exit 1
169179
170180
- name: Clone submission
171-
run: git clone --branch ${{ matrix.submission.tag }} --depth 1 ${{ matrix.submission.normalizedURL }} "${{ matrix.submission.name }}"
181+
run: |
182+
git clone \
183+
--branch ${{ matrix.submission.tag }} \
184+
--depth 1 ${{ matrix.submission.normalizedURL }} \
185+
"${{ matrix.submission.name }}"
172186
173187
- name: Lint submission
174188
id: arduino-lint
@@ -188,7 +202,9 @@ jobs:
188202
echo "::set-output name=report::$(jq -c . "${{ env.REPORT_PATH }}")"
189203
190204
- name: Comment on Arduino Lint warning
191-
if: fromJson(steps.read-lint-report.outputs.report).summary.warningCount > 0 && fromJson(steps.read-lint-report.outputs.report).summary.errorCount == 0
205+
if: >
206+
fromJson(steps.read-lint-report.outputs.report).summary.warningCount > 0
207+
&& fromJson(steps.read-lint-report.outputs.report).summary.errorCount == 0
192208
uses: octokit/[email protected]
193209
env:
194210
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -256,7 +272,8 @@ jobs:
256272
- Commit the required change to the branch you submitted this pull request from.
257273
- Comment here, mentioning @ArduinoBot in the comment
258274
259-
More information: https://github.com/${{ github.repository }}/blob/main/README.md#if-the-problem-is-with-the-pull-request"
275+
More information:
276+
https://github.com/${{ github.repository }}/blob/main/README.md#if-the-problem-is-with-the-pull-request
260277
261278
merge:
262279
needs:
@@ -289,7 +306,12 @@ jobs:
289306
git config --global user.name "ArduinoBot"
290307
echo "${{ needs.parse.outputs.index-entry }}" >> "$INDEX_SOURCE_FILE_PATH"
291308
git add --update "$INDEX_SOURCE_FILE_PATH"
292-
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 -
309+
echo \
310+
-e \
311+
"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 }}" \
312+
| \
313+
git commit \
314+
--file -
293315
git push
294316
295317
request-review:
@@ -323,7 +345,9 @@ jobs:
323345
issue_number: ${{ github.event.pull_request.number }}${{ github.event.issue.number }}
324346
body: |
325347
|
326-
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.
348+
Hi @${{ github.actor }}.
349+
Your pull request has been detected as something other than a Library Manager submission.
350+
A maintainer will need to review it before it can be merged.
327351
328352
If you intended to submit a library, please check the instructions and update your pull request if necessary:
329353
https://github.com/${{ github.repository }}/blob/main/README.md#instructions

.github/workflows/spell-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Spell check
2525
uses: codespell-project/actions-codespell@master
2626
with:
27-
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
27+
# In the event of false positive, add the problematic word, in all lowercase, to a comma-separated list here:
2828
ignore_words_list: ""
2929
builtin: clear,informal,en-GB_to_en-US
3030
check_filenames: true

0 commit comments

Comments
 (0)