Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into reimann-zeta
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Nov 26, 2024
2 parents df59f4c + 28db4f2 commit f16a1a0
Show file tree
Hide file tree
Showing 6,432 changed files with 485,688 additions and 29,455 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
40 changes: 36 additions & 4 deletions .github/workflows/autoclose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
If you would prefer to avoid manual setup, you could also consider using a pre-configured [development container](https://github.com/stdlib-js/stdlib/tree/develop/.devcontainer) for use locally or in GitHub Codespaces.
Thank you again for your interest in stdlib, and we look forward to reviewing your future contriubtions.
Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions.
# Define a job which closes a pull request if a contributor failed to follow contributing guidelines:
contributor_guidelines:
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
If you would prefer to avoid manual setup, you could also consider using a pre-configured [development container](https://github.com/stdlib-js/stdlib/tree/develop/.devcontainer) for use locally or in GitHub Codespaces.
Thank you again for your interest in stdlib, and we look forward to reviewing your future contriubtions.
Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions.
# Define a job which closes a pull request if a contributor failed to follow project conventions:
project_conventions:
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
In short, the more effort you put in to ensure that your contribution looks and feels like stdlib—including variables names, bracket spacing, line breaks, etc—the more likely that your contribution will be reviewed and ultimately accepted. We encourage you to closely study the codebase **before** continuing to work on this pull request.
Thank you again for your interest in stdlib, and we look forward to reviewing your future contriubtions.
Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions.
# Define a job which closes a pull request if a pull request is considered spam:
spam:
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
BODY: |
Thank you for working on this pull request. However, we cannot accept your contribution as this pull request does not meet the standards of this project.
Thank you again for your interest in stdlib, and we look forward to reviewing your future contriubtions.
Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions.
# Lock pull request conversation:
- name: 'Lock conversation'
Expand All @@ -179,3 +179,35 @@ jobs:
GH_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}

# Define a job which closes a pull request if a pull request is considered stale:
stale:

# Define job name:
name: 'Check for stale label'

# Only run this job if the pull request has a specific label:
if: "${{ github.event.label.name == 'autoclose: Stale' }}"

# Define job permissions:
permissions:
contents: read
issues: write
pull-requests: write

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

# Define the sequence of job steps:
steps:
# Close the pull request:
- name: 'Close pull request'
run: gh pr close "$NUMBER" --comment "$BODY"
env:
GH_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
BODY: |
This pull request has been automatically closed because it has been inactive for an extended period after changes were requested. If you still wish to pursue this contribution, feel free to reopen the pull request or submit a new one.
We appreciate your interest in contributing to stdlib!
4 changes: 2 additions & 2 deletions .github/workflows/check_licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
# Install Node.js:
- name: 'Install Node.js'
# Pin action to full length commit SHA
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '20' # 'lts/*'
timeout-minutes: 5
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
# Upload the log file:
- name: 'Upload log file'
# Pin action to full length commit SHA
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: always()
with:
# Define a name for the uploaded artifact:
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/cleanup_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#/
# @license Apache-2.0
#
# Copyright (c) 2024 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/

# Workflow name:
name: cleanup_coverage

# Workflow triggers:
on:

# Trigger the workflow when a pull request is closed (e.g., merged or closed without merging):
pull_request_target:
types:
- closed

# Workflow jobs:
jobs:

# Define a job to perform coverage cleanup...
cleanup:

# Define a display name:
name: 'Cleanup coverage'

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

steps:
# Delete the 'pr-<number>' branch from the 'stdlib-js/www-test-code-coverage' repository:
- name: 'Delete coverage branch for PR'
env:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
curl -X DELETE -H "Authorization: token $REPO_GITHUB_TOKEN" \
"https://api.github.com/repos/stdlib-js/www-test-code-coverage/git/refs/heads/pr-${PR_NUMBER}" \
|| echo "Branch pr-${PR_NUMBER} does not exist or could not be deleted."
# Find and update the '## Coverage Report' comment in the PR
- name: 'Update coverage comment in PR'
# Pin action to full length commit SHA
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
script: |
const prNumber = context.payload.pull_request.number;
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});
const coverageComment = comments.find( comment => comment.body && comment.body.includes( '## Coverage Report' ) );
if ( coverageComment ) {
// Replace URLs with plain text in the coverage report comment body:
const updatedBody = coverageComment.body.replace( /<a href="[^"]+">([^<]+)<\/a>/g, '$1' );
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: coverageComment.id,
body: updatedBody,
});
} else {
console.log( 'No Coverage Report comment found.' );
}
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
# Install Node.js:
- name: 'Install Node.js'
# Pin action to full length commit SHA
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '20' # 'lts/*'
timeout-minutes: 5
Expand Down
90 changes: 90 additions & 0 deletions .github/workflows/generate_pr_commit_message.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#/
# @license Apache-2.0
#
# Copyright (c) 2024 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/

# Workflow name:
name: generate_pr_commit_message

# Workflow triggers:
on:
pull_request_target:
types:
- labeled

# Global permissions:
permissions:
# Allow read-only access to the repository contents:
contents: read

# Allow write access to issues, assignees, labels, and milestones:
issues: write

# Allow write access to pull requests:
pull-requests: write

# Workflow jobs:
jobs:

# Job to generate commit message draft:
generate-commit-message:

# Define a display name:
name: 'Generate PR Commit Message Draft'

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

# Ensure the job only runs when the specified label is added:
if: github.event.label.name == 'Ready to Merge'

# Define environment variables:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}

# Define the sequence of job steps...
steps:
# Checkout repository:
- name: 'Checkout repository'
uses: actions/checkout@v4
with:
# Fetch all commits to ensure we have the full commit history:
fetch-depth: 0

# Generate commit message:
- name: 'Generate commit message'
id: commit_message
run: |
COMMIT_MESSAGE=$($GITHUB_WORKSPACE/.github/workflows/scripts/generate_pr_commit_message $PR_NUMBER)
echo "commit_message<<EOF" >> $GITHUB_OUTPUT
echo "$COMMIT_MESSAGE" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Post commit message as PR comment:
- name: 'Post commit message as PR comment'
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
### PR Commit Message
```text
${{ steps.commit_message.outputs.commit_message }}
```
*Please review the above commit message and make any necessary adjustments.*
2 changes: 1 addition & 1 deletion .github/workflows/good_first_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ jobs:
In short, the more effort you put in to ensure that your contribution looks and feels like stdlib—including variables names, bracket spacing, line breaks, etc—the more likely that your contribution will be reviewed and ultimately accepted. We encourage you to closely study the codebase **before** beginning work on this issue.
:sparkles: Thank you again for your interest in stdlib, and we look forward to reviewing your future contriubtions. :sparkles:
:sparkles: Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions. :sparkles:
43 changes: 22 additions & 21 deletions .github/workflows/lint_autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,26 @@ on:
# Allow the workflow to be triggered by other workflows
workflow_call:
# Define the input parameters for the workflow:
inputs:
pull_request_number:
description: 'PR number'
required: true
type: number
# Define the secrets accessible by the workflow:
secrets:
STDLIB_BOT_GITHUB_TOKEN:
description: 'GitHub token for stdlb-bot'
required: true
REPO_GITHUB_TOKEN:
description: 'GitHub token for accessing the repository'
required: true
STDLIB_BOT_GPG_PRIVATE_KEY:
description: 'GPG private key for stdlb-bot'
required: true
STDLIB_BOT_GPG_PASSPHRASE:
description: 'GPG passphrase for stdlb-bot'
required: true
inputs:
pull_request_number:
description: 'PR number'
required: true
type: number

# Define the secrets accessible by the workflow:
secrets:
STDLIB_BOT_GITHUB_TOKEN:
description: 'GitHub token for stdlb-bot'
required: true
REPO_GITHUB_TOKEN:
description: 'GitHub token for accessing the repository'
required: true
STDLIB_BOT_GPG_PRIVATE_KEY:
description: 'GPG private key for stdlb-bot'
required: true
STDLIB_BOT_GPG_PASSPHRASE:
description: 'GPG passphrase for stdlb-bot'
required: true

# Workflow jobs:
jobs:
Expand Down Expand Up @@ -100,7 +101,7 @@ jobs:
# Install Node.js:
- name: 'Install Node.js'
# Pin action to full length commit SHA
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '20' # 'lts/*'
timeout-minutes: 5
Expand Down Expand Up @@ -163,7 +164,7 @@ jobs:
# Import GPG key to sign commits:
- name: 'Import GPG key to sign commits'
# Pin action to full length commit SHA
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0
with:
gpg_private_key: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint_changed_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
# Install Node.js:
- name: 'Install Node.js'
# Pin action to full length commit SHA
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '20' # 'lts/*'
timeout-minutes: 5
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
- name: 'Setup R'
if: ( success() || failure() ) && steps.check-r-files.outputs.files != ''
# Pin action to full length commit SHA
uses: r-lib/actions/setup-r@929c772977a3a13c8733b363bf5a2f685c25dd91 # v2.6.4
uses: r-lib/actions/setup-r@e6be4b3706e0f39bc7a4cf4496a5f2c4cb840040 # v2.10.1
with:
r-version: '3.5.3'

Expand Down
Loading

0 comments on commit f16a1a0

Please sign in to comment.