Skip to content

Commit 43c08e2

Browse files
Merge branch 'stdlib-js:develop' into gumbel/median
2 parents 9ccb1d5 + 76a5486 commit 43c08e2

File tree

6,674 files changed

+272092
-58962
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,674 files changed

+272092
-58962
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ indent_style = tab
8686
[*.{f,f.txt}]
8787
indent_style = space
8888
indent_size = 2
89-
insert_final_newline = false
9089

9190
# Set properties for shell files:
9291
[*.{sh,sh.txt}]

.github/labeler.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ REPL:
3535
Statistics:
3636
- changed-files:
3737
- any-glob-to-all-files: '**/stats/**/*'
38+
39+
Tools:
40+
- changed-files:
41+
- any-glob-to-all-files: '**/_tools/**/*'

.github/workflows/check_licenses.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
# Upload the log file:
129129
- name: 'Upload log file'
130130
# Pin action to full length commit SHA
131-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
131+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
132132
if: always()
133133
with:
134134
# Define a name for the uploaded artifact:

.github/workflows/good_first_issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
GH_REPO: ${{ github.repository }}
5757
NUMBER: ${{ github.event.issue.number }}
5858
BODY: |
59-
# :rotating_light: Important: PLEASE READ :rotating_light:
59+
# :wave: Important: PLEASE READ :wave:
6060
6161
This issue has been labeled as a **good first issue** and is available for anyone to work on.
6262

.github/workflows/labeler.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424
pull_request_target:
2525
types:
2626
- opened
27+
- closed
2728
- synchronize
2829
- reopened
2930
- edited
@@ -64,6 +65,31 @@ jobs:
6465
configuration-path: .github/labeler.yml
6566
repo-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
6667

68+
# Add "First-time Contributor" label if PR is from a first-time contributor:
69+
- name: 'Add "First-time Contributor" label if PR is from a first-time contributor'
70+
if: ${{ github.event.action == 'opened' || github.event.action == 'reopened' }}
71+
# Pin action to full-length commit SHA
72+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
73+
with:
74+
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
75+
script: |
76+
const { data: pr } = await github.rest.pulls.get({
77+
'owner': context.repo.owner,
78+
'repo': context.repo.repo,
79+
'pull_number': context.payload.pull_request.number
80+
});
81+
if ( pr.author_association === 'FIRST_TIME_CONTRIBUTOR' ) {
82+
const labels = context.payload.pull_request.labels.map( label => label.name );
83+
if ( !labels.includes( 'First-time Contributor' ) ) {
84+
await github.rest.issues.addLabels({
85+
'owner': context.repo.owner,
86+
'repo': context.repo.repo,
87+
'issue_number': context.payload.pull_request.number,
88+
'labels': [ 'First-time Contributor' ]
89+
});
90+
}
91+
}
92+
6793
# Add "Needs Review" label when PR is opened and not a draft:
6894
- name: 'Add "Needs Review" label if PR is opened and not draft'
6995
if: ${{ github.event.action == 'opened' && github.event.pull_request.draft == false }}
@@ -133,3 +159,37 @@ jobs:
133159
console.log( 'Error removing label %s: %s', label, error.message );
134160
}
135161
}
162+
163+
# Remove "First-time Contributor" label from other open PRs of same author if PR is merged:
164+
- name: 'Remove "First-time Contributor" label from other open PRs of same author if PR is merged'
165+
if: ${{ github.event.action == 'closed' && github.event.pull_request.merged == true }}
166+
# Pin action to full length commit SHA
167+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
168+
with:
169+
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
170+
script: |
171+
const prAuthor = context.payload.pull_request.user.login;
172+
const { owner, repo } = context.repo;
173+
174+
// Search for all open PRs from the PR author:
175+
const query = `repo:${owner}/${repo} type:pr state:open author:${prAuthor}`;
176+
const response = await github.rest.search.issuesAndPullRequests({
177+
'q': query,
178+
'per_page': 100
179+
});
180+
181+
const pullRequests = response.data.items;
182+
for ( const pull of pullRequests ) {
183+
if ( pull.user.login === prAuthor ) {
184+
try {
185+
await github.rest.issues.removeLabel({
186+
'owner': context.repo.owner,
187+
'repo': context.repo.repo,
188+
'issue_number': pull.number,
189+
'name': 'First-time Contributor'
190+
});
191+
} catch ( error ) {
192+
console.log( 'Error removing "First-time Contributor" label from PR #%d: %s', pull.number, error.message );
193+
}
194+
}
195+
}

.github/workflows/labeler_needs_changes.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ jobs:
5252
# Pin action to a known commit SHA for reproducibility:
5353
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
5454
with:
55-
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
5655
script: |
5756
await github.rest.issues.addLabels({
5857
'owner': context.repo.owner,

.github/workflows/lint_changed_files.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,21 @@ jobs:
7272
node-version: '20' # 'lts/*'
7373
timeout-minutes: 5
7474

75+
# Cache dependencies:
76+
- name: 'Cache dependencies'
77+
# Pin action to full length commit SHA
78+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
79+
id: cache
80+
with:
81+
path: |
82+
${{ github.workspace }}/node_modules
83+
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
84+
restore-keys: |
85+
${{ runner.os }}-node-
86+
7587
# Install dependencies (accounting for possible network failures, etc, when installing node module dependencies):
7688
- name: 'Install dependencies'
89+
if: steps.cache.outputs.cache-hit != 'true'
7790
run: |
7891
make install-node-modules || make install-node-modules || make install-node-modules
7992
timeout-minutes: 15
@@ -120,7 +133,7 @@ jobs:
120133
- name: 'Lint against EditorConfig'
121134
if: success() || failure()
122135
run: |
123-
make lint-editorconfig-files FILES="${{ steps.changed-files.outputs.files }}"
136+
make lint-editorconfig-files EDITORCONFIG_FORMAT=github-actions FILES="${{ steps.changed-files.outputs.files }}"
124137
125138
# Lint Markdown files:
126139
- name: 'Lint Markdown files'

.github/workflows/lint_random_files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ jobs:
464464
if: ${{ github.event.inputs.fix == 'true' }} && ( success() || failure() )
465465
id: cpr
466466
# Pin action to full length commit SHA
467-
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
467+
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
468468
with:
469469
title: 'style: fix lint errors'
470470
add-paths: ${{ steps.random-files.outputs.files }}

.github/workflows/linux_benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
# Upload the log file:
252252
- name: 'Upload log file'
253253
# Pin action to full length commit SHA
254-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
254+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
255255
if: always()
256256
with:
257257
# Define a name for the uploaded artifact (ensuring a unique name for each job):

.github/workflows/linux_examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
# Upload the log file:
252252
- name: 'Upload log file'
253253
# Pin action to full length commit SHA
254-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
254+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
255255
if: always()
256256
with:
257257
# Define a name for the uploaded artifact (ensuring a unique name for each job):

0 commit comments

Comments
 (0)