Skip to content

Commit 90a4cbd

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents 9325d5f + 6e9f42e commit 90a4cbd

File tree

226 files changed

+1257
-1291
lines changed

Some content is hidden

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

226 files changed

+1257
-1291
lines changed

.github/workflows/scripts/generate_pr_commit_message

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ on_error() {
5656
exit "$1"
5757
}
5858

59-
# Function to resolve GitHub handle to name and email using .mailmap
59+
# Resolves GitHub handle to name and email using .mailmap.
6060
#
6161
# $1 - GitHub handle
6262
resolve_user() {
@@ -76,7 +76,7 @@ resolve_user() {
7676
fi
7777
}
7878

79-
# Function to make authenticated GitHub API requests
79+
# Makes authenticated GitHub API requests.
8080
#
8181
# $1 - HTTP method (GET or POST)
8282
# $2 - API endpoint
@@ -114,12 +114,21 @@ main() {
114114
# Extract co-authors from commits:
115115
co_authors=$(echo "$pr_commits" | jq -r '.[].commit.message' | grep -i "Co-authored-by:" | awk -F': ' '{print $2}' | sort | uniq | paste -sd '\n' -)
116116

117-
# Extract linked issues from PR body (e.g., #123)
117+
# Extract 'Signed-off-by' lines from commits:
118+
signed_off_bys=$(echo "$pr_commits" | jq -r '.[].commit.message' | grep -Eio 'Signed-off-by:.*' | sort -u)
119+
120+
# Extract linked issues from PR body (e.g., #123):
118121
issue_numbers=$(echo "$pr_body" | grep -oE '#[0-9]+' | grep -oE '[0-9]+' | sort | uniq)
119122
closes_issues=""
120123
ref_issues=""
124+
125+
# GitHub-supported closing keywords:
126+
closing_keywords=("close" "closes" "closed" "fix" "fixes" "fixed" "resolve" "resolves" "resolved")
127+
# Create a regex pattern from the keywords:
128+
keywords_pattern=$(IFS='|'; echo "${closing_keywords[*]}")
129+
121130
for issue in $issue_numbers; do
122-
if echo "$pr_body" | grep -qi "closes.*#$issue"; then
131+
if echo "$pr_body" | grep -Eiq "(${keywords_pattern})([[:space:]]+|:)[[:space:]]*#${issue}\b"; then
123132
closes_issues+="Closes: https://github.com/$REPO_OWNER/$REPO_NAME/issues/$issue\n"
124133
else
125134
ref_issues+="Ref: https://github.com/$REPO_OWNER/$REPO_NAME/issues/$issue\n"
@@ -146,10 +155,10 @@ main() {
146155
commit_body+="\nReviewed-by: $resolved_reviewer"
147156
done
148157

149-
# Add Signed-off-by line:
150-
pr_author=$(echo "$pr_details" | jq -r '.user.login')
151-
signed_off_by=$(resolve_user "$pr_author")
152-
commit_body+="\nSigned-off-by: $signed_off_by"
158+
# Include Signed-off-by lines if present in the commits:
159+
if [ -n "$signed_off_bys" ]; then
160+
commit_body+="\n$signed_off_bys"
161+
fi
153162

154163
# Combine subject and body:
155164
commit_message="$commit_subject\n\n$commit_body"

lib/node_modules/@stdlib/array/base/accessor-getter/docs/repl.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
An accessor function accepts the following arguments:
77

8-
- arr: input array
9-
- idx: element index
8+
- arr: input array.
9+
- idx: element index.
1010

1111
If provided an unsupported `dtype`, the function returns a default accessor
1212
function for accessing elements from any indexed array-like object

lib/node_modules/@stdlib/array/base/accessor-setter/docs/repl.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
An accessor function accepts the following arguments:
77

8-
- arr: input array
9-
- idx: element index
10-
- value: value to set
8+
- arr: input array.
9+
- idx: element index.
10+
- value: value to set.
1111

1212
If provided an unsupported `dtype`, the function returns a default accessor
1313
function for accessing elements in any indexed array-like object supporting

lib/node_modules/@stdlib/array/base/cunone-by-right/docs/repl.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
12
{{alias}}( x, predicate[, thisArg] )
23
Cumulatively tests whether no array element in a provided array passes a
34
test implemented by a predicate function, while iterating from
45
right-to-left.
56

67
The predicate function is provided three arguments:
78

8-
- `value`: current array element.
9-
- `index`: current array element index.
10-
- `arr`: the input array.
9+
- value: current array element.
10+
- index: current array element index.
11+
- arr: the input array.
1112

1213
Parameters
1314
----------
@@ -40,9 +41,9 @@
4041

4142
The predicate function is provided three arguments:
4243

43-
- `value`: current array element.
44-
- `index`: current array element index.
45-
- `arr`: the input array.
44+
- value: current array element.
45+
- index: current array element index.
46+
- arr: the input array.
4647

4748
Parameters
4849
----------

lib/node_modules/@stdlib/array/base/cunone-by/docs/repl.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
The predicate function is provided three arguments:
77

8-
- `value`: current array element.
9-
- `index`: current array element index.
10-
- `arr`: the input array.
8+
- value: current array element.
9+
- index: current array element index.
10+
- arr: the input array.
1111

1212
Parameters
1313
----------

lib/node_modules/@stdlib/array/base/cusome-by-right/docs/repl.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
12
{{alias}}( x, n, predicate[, thisArg] )
2-
Cumulatively test whether at least `n` elements in a provided array pass a
3+
Cumulatively tests whether at least `n` elements in a provided array pass a
34
test implemented by a predicate function, while iterating from
45
right-to-left.
56

67
The predicate function is provided three arguments:
78

8-
- `value`: current array element.
9-
- `index`: current array element index.
10-
- `arr`: the input array.
9+
- value: current array element.
10+
- index: current array element index.
11+
- arr: the input array.
1112

1213
Parameters
1314
----------
@@ -43,9 +44,9 @@
4344

4445
The predicate function is provided three arguments:
4546

46-
- `value`: current array element.
47-
- `index`: current array element index.
48-
- `arr`: the input array.
47+
- value: current array element.
48+
- index: current array element index.
49+
- arr: the input array.
4950

5051
Parameters
5152
----------

lib/node_modules/@stdlib/array/base/getter/docs/repl.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
An accessor function accepts the following arguments:
77

8-
- arr: input array
9-
- idx: element index
8+
- arr: input array.
9+
- idx: element index.
1010

1111
If provided an unsupported `dtype`, the function returns a default accessor
1212
function for accessing elements from any indexed array-like object.

lib/node_modules/@stdlib/array/base/resolve-getter/docs/repl.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
An accessor function accepts the following arguments:
77

8-
- arr: input array
9-
- idx: element index
8+
- arr: input array.
9+
- idx: element index.
1010

1111
If provided an array-like object having an unsupported data type, the
1212
function returns a default accessor function for accessing elements from

lib/node_modules/@stdlib/array/base/resolve-setter/docs/repl.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
An accessor function accepts the following arguments:
66

7-
- arr: input array
8-
- idx: element index
9-
- value: value to set
7+
- arr: input array.
8+
- idx: element index.
9+
- value: value to set.
1010

1111
If provided an array-like object having an unsupported data type, the
1212
function returns a default accessor function for accessing elements in any

lib/node_modules/@stdlib/array/base/setter/docs/repl.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
An accessor function accepts the following arguments:
77

8-
- arr: input array
9-
- idx: element index
10-
- value: value to set
8+
- arr: input array.
9+
- idx: element index.
10+
- value: value to set.
1111

1212
If provided an unsupported `dtype`, the function returns a default accessor
1313
function for accessing elements in any indexed array-like object.

0 commit comments

Comments
 (0)