Skip to content

Commit d8d17b5

Browse files
Merge branch 'stdlib-js:develop' into rfc/hypergeom-skewness
2 parents 06cc693 + 48f82a2 commit d8d17b5

File tree

7,230 files changed

+296682
-66938
lines changed

Some content is hidden

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

7,230 files changed

+296682
-66938
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/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,5 @@ body:
117117
options:
118118
- label: Read and understood the [Code of Conduct](https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md).
119119
required: true
120-
- label: Searched for existing issues and pull requests.
120+
- label: Searched for existing issues and pull requests.
121121
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
contact_links:
2020
- name: 👩‍🏫 Frequently Asked Questions
21-
url: https://github.com/stdlib-js/stdlib/blob/develop/FAQ.md
21+
url: https://github.com/stdlib-js/stdlib/blob/develop/FAQ.md
2222
about: Consult the FAQ in case we have already answered your question there.
2323
- name: 💬 Question
24-
url: https://gitter.im/stdlib-js/stdlib
24+
url: https://gitter.im/stdlib-js/stdlib
2525
about: Got a (non-bug related) question we haven't already answered? Ask us on Gitter! 🤗
2626
- name: 👏 Support Us
2727
url: https://github.com/stdlib-js/stdlib/blob/develop/docs/support_the_project.md

.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/do_not_merge.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ jobs:
4343

4444
# Define job permissions:
4545
permissions:
46-
contents: read
47-
pull-requests: write
46+
pull-requests: read
4847

4948
# Define the type of virtual host machine:
5049
runs-on: ubuntu-latest

.github/workflows/first_time_greeting.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ on: [pull_request_target, issues]
2424

2525
# Global permissions:
2626
permissions:
27-
# Allow read-only access to the repository contents:
28-
contents: read
27+
# Do not give the workflow any permissions:
28+
contents: none
2929

3030
# Workflow jobs:
3131
jobs:
@@ -47,7 +47,7 @@ jobs:
4747
# Pin action to full length commit SHA
4848
uses: actions/first-interaction@34f15e814fe48ac9312ccf29db4e74fa767cbab7 # v1.3.0
4949
with:
50-
repo-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
50+
repo-token: ${{ secrets.STDLIB_BOT_FGPAT_PR_WRITE }}
5151
issue-message: |
5252
:wave: Hi there! :wave:
5353

.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,

0 commit comments

Comments
 (0)