Skip to content

Commit 0140996

Browse files
authored
Merge branch 'develop' into dvander
2 parents fb19b1a + 93c9868 commit 0140996

6,294 files changed

Lines changed: 212951 additions & 15612 deletions

File tree

Some content is hidden

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

.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_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/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 }}

.github/workflows/lint_autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
# Import GPG key to sign commits:
162162
- name: 'Import GPG key to sign commits'
163163
# Pin action to full length commit SHA
164-
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
164+
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0
165165
with:
166166
gpg_private_key: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
167167
passphrase: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}

.github/workflows/lint_changed_files.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
# Restore cache if up-to-date:
7676
- name: 'Restore cache if up-to-date'
7777
# Pin action to full length commit SHA
78-
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
78+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
7979
id: cache
8080
with:
8181
path: |
@@ -138,7 +138,7 @@ jobs:
138138
# Save cache after editorconfig-checker binary has been downloaded:
139139
- name: 'Save cache after editorconfig-checker binary has been downloaded'
140140
if: always() && steps.cache.outputs.cache-hit != 'true'
141-
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
141+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
142142
with:
143143
path: ${{ github.workspace }}/node_modules
144144
key: ${{ steps.cache.outputs.cache-primary-key }}
@@ -147,7 +147,7 @@ jobs:
147147
- name: 'Lint Markdown files'
148148
if: success() || failure()
149149
run: |
150-
files=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep -E '\.md$' | tr '\n' ' ' | sed 's/ $//')
150+
files=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep -E '\.md$' | grep -v '^\.github/workflows/.*\.md$' | tr '\n' ' ' | sed 's/ $//')
151151
if [ -n "${files}" ]; then
152152
make lint-markdown-files FILES="${files}"
153153
fi
@@ -274,7 +274,7 @@ jobs:
274274
# Pin action to full length commit SHA
275275
uses: r-lib/actions/setup-r@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 # v2.11.4
276276
with:
277-
r-version: '3.5.3'
277+
r-version: '4.3.3'
278278

279279
# Lint R files:
280280
- name: 'Lint R files'
@@ -345,7 +345,7 @@ jobs:
345345
- name: 'Lint license headers'
346346
if: success() || failure()
347347
run: |
348-
files=$(echo "${{ steps.changed-files.outputs.files }}")
348+
files=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep -v '\.github/workflows/.*\.md$' | grep -v '\.lock\.yml$' | tr '\n' ' ' | sed 's/ $//')
349349
if [[ -n "${files}" ]]; then
350350
make lint-license-headers-files FILES="${files}"
351351
fi

0 commit comments

Comments
 (0)