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 <[email protected]> Lovelin
228228

229229
Manvith M <[email protected]> Manvith
230230

231+
Mara Averick <[email protected]> batpigandme
232+
231233
Marcus Fantham <[email protected]> Marcus
232234

233235

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ Mahfuza Humayra Mohona <[email protected]>
120120
121121
Manik Sharma <[email protected]>
122122
Manvith M <[email protected]>
123+
Mara Averick <[email protected]>
123124
Marcus Fantham <[email protected]>
124125
Matt Cochrane <[email protected]>
125126
Mihir Pandit <[email protected]>

0 commit comments

Comments
 (0)