Skip to content

Commit 15858f6

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents ea30d86 + e14ea8a commit 15858f6

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

.github/workflows/lint_random_files.yml

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,13 +502,58 @@ jobs:
502502
503503
# Lint TypeScript declarations files:
504504
- name: 'Lint TypeScript declarations files'
505+
id: lint-typescript-declarations
505506
if: ( github.event.inputs.javascript != 'false' ) && ( success() || failure() )
506507
run: |
508+
set -o pipefail
507509
files=$(echo "${{ steps.random-files.outputs.files }}" | tr ',' '\n' | grep -E '\.d\.ts$' | tr '\n' ' ')
508510
if [[ -n "${files}" ]]; then
509-
make TYPESCRIPT_DECLARATIONS_LINTER=eslint lint-typescript-declarations-files FAST_FAIL=0 FILES="${files}"
511+
make TYPESCRIPT_DECLARATIONS_LINTER=eslint lint-typescript-declarations-files FAST_FAIL=0 FILES="${files}" 2>&1 | tee lint_typescript_declarations_errors.txt
510512
fi
511513
514+
# Create sub-issue for TypeScript declarations lint failures:
515+
- name: 'Create sub-issue for TypeScript declarations lint failures'
516+
if: failure() && contains(steps.lint-typescript-declarations.outcome, 'failure')
517+
env:
518+
GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
519+
run: |
520+
strip_ansi() {
521+
sed -r 's/\x1B\[[0-9;]*[mK]//g'
522+
}
523+
524+
BODY_FILE="$GITHUB_WORKSPACE/lint_issue_body.md"
525+
cat << EOF > "$BODY_FILE"
526+
## TypeScript Declarations Linting Failures
527+
528+
Linting failures were detected in the automated TypeScript declarations lint workflow run.
529+
530+
### Workflow Details
531+
532+
- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
533+
- Type: TypeScript Declarations Linting
534+
- Date: $(date -u +"%Y-%m-%d %H:%M:%S UTC")
535+
536+
### Error Details
537+
538+
\`\`\`
539+
$(cat lint_typescript_declarations_errors.txt | strip_ansi)
540+
\`\`\`
541+
542+
### Pull Request Instructions
543+
544+
- Please use the following PR title format:
545+
"chore: fix TypeScript declarations lint errors (issue #<ISSUE_NUMBER>)".
546+
- Reference this issue in the "Related Issues" section of the PR body as "resolves #<ISSUE_NUMBER>".
547+
EOF
548+
549+
. "$GITHUB_WORKSPACE/.github/workflows/scripts/create_sub_issue" \
550+
'Fix TypeScript declarations lint errors' \
551+
"$BODY_FILE" \
552+
"9110" \
553+
"Good First Issue"
554+
555+
rm "$BODY_FILE"
556+
512557
# Lint license headers:
513558
- name: 'Lint license headers'
514559
if: success() || failure()

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com> Lovelin
228228

229229
Manvith M <148960168+manvith2003@users.noreply.github.com> Manvith
230230

231+
Mara Averick <batpigandme@users.noreply.github.com> batpigandme
232+
231233
Marcus Fantham <mfantham@users.noreply.github.com> Marcus
232234

233235
Matt Cochrane <matthew.cochrane.eng@gmail.com> <mattisback@gmail.com>

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ Mahfuza Humayra Mohona <mhmohona@gmail.com>
120120
MANI <77221000+Eternity0207@users.noreply.github.com>
121121
Manik Sharma <maniksharma.rke@gmail.com>
122122
Manvith M <148960168+manvith2003@users.noreply.github.com>
123+
Mara Averick <batpigandme@users.noreply.github.com>
123124
Marcus Fantham <mfantham@users.noreply.github.com>
124125
Matt Cochrane <matthew.cochrane.eng@gmail.com>
125126
Mihir Pandit <129577900+MSP20086@users.noreply.github.com>

0 commit comments

Comments
 (0)