Skip to content

Commit 34d42d2

Browse files
Merge branch 'gammasgnf' of https://github.com/vivekmaurya001/stdlib into gammasgnf
2 parents ffafd6c + c556d55 commit 34d42d2

File tree

68 files changed

+2437
-330
lines changed

Some content is hidden

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

68 files changed

+2437
-330
lines changed

.github/workflows/labeler.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ name: labeler
2222
# Workflow triggers:
2323
on:
2424
pull_request_target:
25+
types:
26+
- opened
27+
- synchronize
28+
- reopened
29+
- edited
30+
- review_requested
31+
- review_request_removed
32+
- ready_for_review
33+
- converted_to_draft
2534

2635
# Workflow jobs:
2736
jobs:
@@ -53,3 +62,52 @@ jobs:
5362
with:
5463
configuration-path: .github/labeler.yml
5564
repo-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
65+
66+
# Add "Needs Review" label when PR is opened and not a draft:
67+
- name: 'Add "Needs Review" label if PR is opened and not draft'
68+
if: ${{ github.event.action == 'opened' && github.event.pull_request.draft == false }}
69+
# Pin action to full length commit SHA
70+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
71+
with:
72+
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
73+
script: |
74+
await github.rest.issues.addLabels({
75+
'owner': context.repo.owner,
76+
'repo': context.repo.repo,
77+
'issue_number': context.payload.pull_request.number,
78+
'labels': ['Needs Review'],
79+
})
80+
81+
# Add "Needs Review" label when PR is marked ready for review:
82+
- name: 'Add "Needs Review" label if PR is ready for review'
83+
if: ${{ github.event.action == 'ready_for_review' }}
84+
# Pin action to full length commit SHA
85+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
86+
with:
87+
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
88+
script: |
89+
await github.rest.issues.addLabels({
90+
'owner': context.repo.owner,
91+
'repo': context.repo.repo,
92+
'issue_number': context.payload.pull_request.number,
93+
'labels': ['Needs Review'],
94+
})
95+
96+
# Remove "Needs Review" label when PR is converted to draft or closed:
97+
- name: 'Remove "Needs Review" label if PR is converted to draft or closed'
98+
if: ${{ github.event.action == 'converted_to_draft' || github.event.action == 'closed' }}
99+
# Pin action to full length commit SHA
100+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
101+
with:
102+
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
103+
script: |
104+
try {
105+
await github.rest.issues.removeLabel({
106+
'owner': context.repo.owner,
107+
'repo': context.repo.repo,
108+
'issue_number': context.payload.pull_request.number,
109+
'name': 'Needs Review',
110+
})
111+
} catch ( error ) {
112+
console.log( 'Error removing label: %s', error.message );
113+
}

.github/workflows/lint_changed_files.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ jobs:
148148
# Define the path to a utility for linting package.json files:
149149
lint_package_json="${root}/lib/node_modules/@stdlib/_tools/lint/pkg-json/bin/cli"
150150
151+
# Define paths to utilities for updating package.json metadata fields:
152+
update_package_json_directories="${root}/lib/node_modules/@stdlib/_tools/package-json/scripts/update_directories"
153+
update_package_json_gypfile="${root}/lib/node_modules/@stdlib/_tools/package-json/scripts/update_gypfile"
154+
155+
# Lint changed package.json files:
151156
files=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep 'package\.json$' | grep -v 'datapackage\.json$' | tr '\n' ' ' | sed 's/ $//')
152157
if [ -n "${files}" ]; then
153158
echo "Linting package.json files that have changed..."
@@ -156,6 +161,25 @@ jobs:
156161
echo "No package.json files to lint."
157162
fi
158163
164+
# Check if metadata fields need to be updated in package.json files of affected packages:
165+
dirs=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | xargs dirname | sort -u)
166+
needs_changes=0
167+
for dir in ${dirs}; do
168+
echo "Checking package.json in ${dir}..."
169+
"${update_package_json_directories}" "${dir}"
170+
"${update_package_json_gypfile}" "${dir}"
171+
if [[ `git status --porcelain` ]]; then
172+
echo "::error::Package.json in ${dir} needs updates to directories and/or gypfile fields"
173+
git diff
174+
needs_changes=1
175+
fi
176+
done
177+
178+
# Exit with failure if any needed changes were detected:
179+
if [ $needs_changes -eq 1 ]; then
180+
exit 1
181+
fi
182+
159183
# Lint REPL help files...
160184
- name: 'Lint REPL help files'
161185
if: success() || failure()

.github/workflows/slash_commands.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ jobs:
5151
github-token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
5252
script: |
5353
github.rest.issues.addLabels({
54-
owner: context.repo.owner,
55-
repo: context.repo.repo,
56-
issue_number: context.issue.number,
57-
labels: ['bot: In Progress']
54+
'owner': context.repo.owner,
55+
'repo': context.repo.repo,
56+
'issue_number': context.issue.number,
57+
'labels': ['bot: In Progress']
5858
})
5959
6060
# Add initial reaction to comment with slash command:
@@ -254,11 +254,11 @@ jobs:
254254
script: |
255255
try {
256256
await github.rest.issues.removeLabel({
257-
owner: context.repo.owner,
258-
repo: context.repo.repo,
259-
issue_number: context.issue.number,
260-
name: 'bot: In Progress'
257+
'owner': context.repo.owner,
258+
'repo': context.repo.repo,
259+
'issue_number': context.issue.number,
260+
'name': 'bot: In Progress'
261261
})
262-
} catch (error) {
263-
console.log( 'Error removing label:', error );
262+
} catch ( error ) {
263+
console.log( 'Error removing label: %s', error.message );
264264
}

.mailmap

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ Adarsh Palaskar <[email protected]> adarshpalaskar1
2020
2121
Aditya Sapra <[email protected]> adityacodes30
2222

23+
Ahmed Atwa <[email protected]> NightKnight
24+
25+
26+
Ahmed Kashkoush <[email protected]> Ahmed_Kashkoush
27+
2328
2429
Aman Bhansali <[email protected]> aman-095
2530

@@ -99,10 +104,17 @@ Muhammad Haris <[email protected]> headlessNode
99104

100105
101106

107+
Nishant Shinde <[email protected]> nishant-s7
108+
102109
Nithin Katta <[email protected]> KATTA NAGA NITHIN
103110

111+
# O
112+
113+
Ori Miles <[email protected]> orimiles5
114+
104115
# P
105116

117+
Philipp Burckhardt <[email protected]> <[email protected]>
106118
Philipp Burckhardt <[email protected]> Planeshifter
107119

108120
@@ -117,6 +129,8 @@ Pratyush Kumar Chouhan <[email protected]> Pratyush
117129

118130
Priyansh <[email protected]> itsspriyansh
119131

132+
Priyanshu Agarwal <[email protected]> AgPriyanshu18
133+
120134
Pushpendra Chandravanshi <[email protected]> <[email protected]>
121135
Pushpendra Chandravanshi <[email protected]> Pushpendra766
122136

@@ -132,16 +146,20 @@ Rejoan Sardar <[email protected]> Rejoan-Sardar
132146
133147
134148

149+
Rishav <[email protected]> RISHAV
150+
135151
Robert Gislason <[email protected]> rgizz
136152

137-
Rutam <[email protected]> performant23
153+
Rutam Kathale <[email protected]> performant23
138154

139155
Ryan Seal <[email protected]> Splrk
140156

141157
# S
142158

143159
Sai Srikar Dumpeti <[email protected]> the-r3aper7
144160

161+
Sarthak Paandey <[email protected]> SarthakPaandey
162+
145163
Shashank Shekhar Singh <[email protected]> <[email protected]>
146164
Shashank Shekhar Singh <[email protected]> Shashankss1205
147165

@@ -160,6 +178,8 @@ Stephannie Jiménez Gacha <[email protected]> <[email protected].
160178
Stephannie Jiménez Gacha <[email protected]> Stephannie Jimenez
161179
Stephannie Jiménez Gacha <[email protected]> Stephannie Jimenez Gacha
162180

181+
Suraj Kumar <[email protected]> Suraj kuma
182+
163183
# T
164184

165185
Tudor Pagu <[email protected]> tudor-pagu
@@ -184,5 +204,7 @@ Varad Gupta <[email protected]> vr-varad
184204

185205
# Y
186206

207+
Yaswanth Kosuru <[email protected]> yaswanth
208+
187209
188210

CONTRIBUTORS

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Aayush Khanna <[email protected]>
66
Abhijit Raut <[email protected]>
77
Adarsh Palaskar <[email protected]>
88
Aditya Sapra <[email protected]>
9-
AgPriyanshu18 <[email protected]>
9+
Ahmed Atwa <[email protected]>
10+
Ahmed Kashkoush <[email protected]>
1011
Aleksandr <[email protected]>
1112
Ali Salesi <[email protected]>
1213
Aman Bhansali <[email protected]>
@@ -60,32 +61,34 @@ Momtchil Momtchev <[email protected]>
6061
Muhammad Haris <[email protected]>
6162
Naresh Jagadeesan <[email protected]>
6263
Neeraj Pathak <[email protected]>
63-
NightKnight <Ahmedatwa866@yahoo.com>
64+
Nishant Shinde <[email protected].com>
6465
Nithin Katta <[email protected]>
6566
Nourhan Hasan <[email protected]>
6667
Ognjen Jevremović <[email protected]>
6768
Oneday12323 <[email protected]>
69+
Ori Miles <[email protected]>
6870
Philipp Burckhardt <[email protected]>
6971
Prajwal Kulkarni <[email protected]>
7072
Pranav Goswami <[email protected]>
7173
7274
7375
Pratyush Kumar Chouhan <[email protected]>
7476
77+
Priyanshu Agarwal <[email protected]>
7578
Pushpendra Chandravanshi <[email protected]>
76-
7779
Raunak Kumar Gupta <[email protected]>
7880
Rejoan Sardar <[email protected]>
7981
Ricky Reusser <[email protected]>
8082
Ridam Garg <[email protected]>
83+
8184
Robert Gislason <[email protected]>
8285
Roman Stetsyk <[email protected]>
83-
86+
Rutam Kathale <[email protected]>
8487
Ruthwik Chikoti <[email protected]>
8588
Ryan Seal <[email protected]>
8689
Rylan Yang <[email protected]>
8790
Sai Srikar Dumpeti <[email protected]>
88-
SarthakPaandey <[email protected]>
91+
Sarthak Paandey <[email protected]>
8992
Saurabh Singh <[email protected]>
9093
Seyyed Parsa Neshaei <[email protected]>
9194
Shashank Shekhar Singh <[email protected]>
@@ -98,7 +101,7 @@ Snehil Shah <[email protected]>
98101
Soumajit Chatterjee <[email protected]>
99102
Spandan Barve <[email protected]>
100103
Stephannie Jiménez Gacha <[email protected]>
101-
Suraj kumar <[email protected]>
104+
Suraj Kumar <[email protected]>
102105
Tirtadwipa Manunggal <[email protected]>
103106
Tudor Pagu <[email protected]>
104107
Tufailahmed Bargir <[email protected]>
@@ -109,11 +112,9 @@ Vaibhav Patel <[email protected]>
109112
Varad Gupta <[email protected]>
110113
Vinit Pandit <[email protected]>
111114
Xiaochuan Ye <[email protected]>
115+
Yaswanth Kosuru <[email protected]>
112116
Yernar Yergaziyev <[email protected]>
113117
114-
nishant-s7 <[email protected]>
115118
olenkabilonizhka <[email protected]>
116-
orimiles5 <[email protected]>
117119
118120
119-

lib/node_modules/@stdlib/_tools/eslint/rules/no-multiple-empty-lines/lib/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ function main( context ) {
169169

170170
rule = {
171171
'meta': {
172+
'type': 'layout',
172173
'docs': {
173174
'description': 'enforce that code does not contain multiple blank lines'
174175
},

0 commit comments

Comments
 (0)