Skip to content

Commit 28f989b

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into feat/stats-base-ndarray-smaxsorted-native
2 parents a7810f0 + b05fe40 commit 28f989b

File tree

6,692 files changed

+287443
-19636
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,692 files changed

+287443
-19636
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ indent_style = tab
165165
indent_style = space
166166
indent_size = 2
167167
168+
# Ignore generated lock files for GitHub Agentic Workflows:
169+
[*.lock.yml]
170+
charset = unset
171+
end_of_line = unset
172+
indent_style = unset
173+
indent_size = unset
174+
trim_trailing_whitespace = unset
175+
insert_final_newline = unset
176+
168177
# Set properties for GYP files:
169178
[binding.gyp]
170179
indent_style = space

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@ Makefile linguist-vendored
6464

6565
# Configure files which should be included in GitHub language statistics:
6666
docs/types/*.d.ts -linguist-documentation
67+
68+
.github/workflows/*.lock.yml linguist-generated=true merge=ours

.github/aw/actions-lock.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"entries": {
3+
"actions/github-script@v8": {
4+
"repo": "actions/github-script",
5+
"version": "v8",
6+
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
7+
},
8+
"github/gh-aw-actions/setup@v0.61.2": {
9+
"repo": "github/gh-aw-actions/setup",
10+
"version": "v0.61.2",
11+
"sha": "71cfb3cbe2002225f9d5afa180669fff36b86ea2"
12+
}
13+
}
14+
}

.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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
131+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
132132
if: always()
133133
with:
134134
# Define a name for the uploaded artifact:

.github/workflows/check_pr_issue_references.lock.yml

Lines changed: 1001 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
---
2+
description: >
3+
Checks whether issue/PR references in a PR body are actually related to the PR.
4+
Posts an informational comment when suspicious references are detected.
5+
6+
run-name: check_pr_issue_references
7+
8+
on:
9+
schedule: every 6h
10+
workflow_dispatch:
11+
inputs:
12+
pr_numbers:
13+
description: 'Comma-separated PR numbers to check (leave empty to auto-discover recent PRs)'
14+
required: false
15+
type: string
16+
17+
permissions:
18+
contents: read
19+
issues: read
20+
pull-requests: read
21+
22+
engine:
23+
id: copilot
24+
25+
tools:
26+
github:
27+
toolsets: [issues, pull_requests, repos]
28+
lockdown: false
29+
min-integrity: none
30+
repos: all
31+
32+
network:
33+
allowed:
34+
- defaults
35+
36+
safe-outputs:
37+
add-comment:
38+
max: 10
39+
noop:
40+
max: 10
41+
42+
timeout-minutes: 10
43+
---
44+
45+
# Check PR Issue References
46+
47+
You are a reference validator for the stdlib-js/stdlib repository. Your task is
48+
to check whether issue/PR references in pull request descriptions are actually
49+
related to the PRs.
50+
51+
## Step 1: Discover PRs to Check
52+
53+
If `${{ github.event.inputs.pr_numbers }}` is provided, parse it as a
54+
comma-separated list of PR numbers and fetch those PRs.
55+
56+
Otherwise, use the GitHub tool to list open pull requests in `stdlib-js/stdlib`,
57+
sorted by `updated` in descending order. Filter to PRs whose `updated_at` is
58+
within the last 7 hours. If no PRs match, call `noop` with "No recently updated
59+
PRs found" and stop.
60+
61+
Process at most 10 PRs per run.
62+
63+
## Step 2: Check for Existing Comments (Deduplication)
64+
65+
For each PR, before analyzing it:
66+
67+
1. List comments on the PR using the GitHub tool.
68+
2. If any comment body contains the heading `**Issue Reference Review**`, this
69+
PR was already checked. Skip it and call `noop` with "PR #X already has an
70+
Issue Reference Review comment. Skipping."
71+
3. If no such comment exists, proceed to Step 3.
72+
73+
## Step 3: Extract and Assess References
74+
75+
For each PR that passes deduplication:
76+
77+
1. **Extract all issue/PR references** from the PR body. Look for:
78+
- `#123` (bare references)
79+
- `stdlib-js/stdlib#123` (qualified references)
80+
- `https://github.com/stdlib-js/stdlib/issues/123` (URL references)
81+
- Pay special attention to closing keywords: Resolves, Closes, Fixes (and variants)
82+
83+
2. **For each referenced issue/PR**, fetch its title and body using the GitHub tool.
84+
85+
3. **Assess whether each reference is plausibly related** to the pull request:
86+
- **related**: Clear topical connection (same package, same feature area, PR addresses the issue)
87+
- **suspicious**: Connection is unclear or tenuous
88+
- **unrelated**: Completely different topics, packages, or feature areas
89+
90+
## Assessment Guidelines
91+
92+
- stdlib is a large numerical/scientific computing library with thousands of packages
93+
(e.g., `@stdlib/math/base/special/sin`, `@stdlib/stats/incr/mean`)
94+
- A PR adding a new package often references the issue that requested it — this is VALID
95+
- A PR fixing tests/benchmarks/docs for a package may reference the original creation issue — VALID
96+
- References to "Tracking Issues" (issues listing many sub-tasks) are usually VALID
97+
- PRs may reference broad project-wide issues — give benefit of the doubt
98+
- **When in doubt, lean toward "related".** False positives are worse than false negatives.
99+
- If a PR has no issue references at all, that is fine — call noop.
100+
- If a PR has more than 10 references, call noop (too many to meaningfully assess).
101+
102+
## Safe Outputs
103+
104+
When calling `add-comment`, you **MUST** set the `item_number` parameter to the
105+
PR number so the comment is posted on the correct PR.
106+
107+
- **If ALL references appear related** (or there are no references): Call `noop` with a
108+
brief explanation like "All N issue references in PR #X appear related."
109+
110+
- **If any references appear suspicious or unrelated**: Use `add-comment` to post a
111+
comment on the PR:
112+
113+
> ⚠️ **Issue Reference Review**
114+
>
115+
> An automated check found potentially unrelated issue/PR references in this PR:
116+
>
117+
> | Reference | Assessment | Reasoning |
118+
> | --- | --- | --- |
119+
> | #123 | suspicious | PR adds math/sin but issue is about string/trim |
120+
>
121+
> **Why this matters:** GitHub automatically closes issues referenced with closing
122+
> keywords (Resolves, Closes, Fixes) when the PR is merged. Incorrect references
123+
> can accidentally close unrelated issues.
124+
>
125+
> **What to do:**
126+
> - If the reference is correct, no action needed. This check may produce false positives.
127+
> - If the reference is incorrect, please update your PR description.
128+
>
129+
> *This assessment was generated by an AI model and is informational only.*
130+
131+
Only include suspicious/unrelated references in the table, not related ones.
132+
133+
## Important Notes
134+
135+
- Process each PR independently. A failure on one PR should not prevent checking others.
136+
- A `noop` call is expected for each PR that is skipped or has all-valid references.

.github/workflows/generate_monthly_changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
# Import GPG key to sign commits:
107107
- name: 'Import GPG key to sign commits'
108108
# Pin action to full length commit SHA
109-
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
109+
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0
110110
with:
111111
gpg_private_key: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
112112
passphrase: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}

.github/workflows/generate_pr_commit_message.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ jobs:
7070
COMMIT_MESSAGE=$($GITHUB_WORKSPACE/.github/workflows/scripts/generate_pr_commit_message/run $PR_NUMBER)
7171
EXIT_CODE=$?
7272
73+
if [ $EXIT_CODE -eq 1 ]; then
74+
echo "::error::Failed to generate commit message for PR #$PR_NUMBER"
75+
exit 1
76+
fi
77+
7378
echo "commit_message<<EOF" >> $GITHUB_OUTPUT
7479
echo "$COMMIT_MESSAGE" >> $GITHUB_OUTPUT
7580
echo "EOF" >> $GITHUB_OUTPUT
@@ -80,9 +85,6 @@ jobs:
8085
echo "has_tracking_issue=false" >> $GITHUB_OUTPUT
8186
fi
8287
83-
# Ensure the script itself doesn't fail the workflow:
84-
exit 0
85-
8688
# Check if the commit message already exists in the PR comments:
8789
- name: 'Check if commit message already exists in PR comments'
8890
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0

.github/workflows/git_note_amend_message.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
# Import GPG key to sign commits:
121121
- name: 'Import GPG key to sign commits'
122122
# Pin action to full length commit SHA
123-
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
123+
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0
124124
with:
125125
gpg_private_key: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
126126
passphrase: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}

.github/workflows/git_note_filter_packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
# Import GPG key to sign commits:
130130
- name: 'Import GPG key to sign commits'
131131
# Pin action to full length commit SHA
132-
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
132+
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0
133133
with:
134134
gpg_private_key: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
135135
passphrase: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}

0 commit comments

Comments
 (0)