@reviewflow/sdk 6.21.0 → 6.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index-browser.es.js +0 -10
- package/build/index-node.mjs +0 -10
- package/package.json +15 -15
|
@@ -1023,9 +1023,7 @@ const restComment = (comment) => ({
|
|
|
1023
1023
|
line: comment.line,
|
|
1024
1024
|
side: comment.side,
|
|
1025
1025
|
...comment.startLine === null || comment.startSide === null ? {} : {
|
|
1026
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1027
1026
|
start_line: comment.startLine,
|
|
1028
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1029
1027
|
start_side: comment.startSide
|
|
1030
1028
|
}
|
|
1031
1029
|
});
|
|
@@ -1091,7 +1089,6 @@ const editPullRequest = async (transport, { ownerRepo, number, edit }, options =
|
|
|
1091
1089
|
await transport.rest({
|
|
1092
1090
|
method: "POST",
|
|
1093
1091
|
path: `${pullPath}/requested_reviewers`,
|
|
1094
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1095
1092
|
body: { reviewers: edit.add, team_reviewers: edit.addTeams }
|
|
1096
1093
|
});
|
|
1097
1094
|
}
|
|
@@ -1099,7 +1096,6 @@ const editPullRequest = async (transport, { ownerRepo, number, edit }, options =
|
|
|
1099
1096
|
await transport.rest({
|
|
1100
1097
|
method: "DELETE",
|
|
1101
1098
|
path: `${pullPath}/requested_reviewers`,
|
|
1102
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1103
1099
|
body: { reviewers: edit.remove, team_reviewers: edit.removeTeams }
|
|
1104
1100
|
});
|
|
1105
1101
|
}
|
|
@@ -1147,13 +1143,10 @@ const editPullRequest = async (transport, { ownerRepo, number, edit }, options =
|
|
|
1147
1143
|
method: "PUT",
|
|
1148
1144
|
path: `${pullPath}/merge`,
|
|
1149
1145
|
body: {
|
|
1150
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1151
1146
|
merge_method: edit.method,
|
|
1152
1147
|
sha: edit.expectedHeadSha,
|
|
1153
1148
|
...edit.commitMessage === void 0 ? {} : {
|
|
1154
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1155
1149
|
commit_title: edit.commitMessage.title,
|
|
1156
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1157
1150
|
commit_message: edit.commitMessage.body
|
|
1158
1151
|
}
|
|
1159
1152
|
}
|
|
@@ -1164,7 +1157,6 @@ const editPullRequest = async (transport, { ownerRepo, number, edit }, options =
|
|
|
1164
1157
|
await transport.rest({
|
|
1165
1158
|
method: "PUT",
|
|
1166
1159
|
path: `${pullPath}/update-branch`,
|
|
1167
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1168
1160
|
body: { expected_head_sha: edit.expectedHeadSha }
|
|
1169
1161
|
});
|
|
1170
1162
|
return null;
|
|
@@ -1244,7 +1236,6 @@ const editPullRequest = async (transport, { ownerRepo, number, edit }, options =
|
|
|
1244
1236
|
method: "POST",
|
|
1245
1237
|
path: `${pullPath}/reviews`,
|
|
1246
1238
|
body: {
|
|
1247
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1248
1239
|
commit_id: edit.commitId,
|
|
1249
1240
|
...edit.body === "" ? {} : { body: edit.body },
|
|
1250
1241
|
event: reviewEventNames[edit.event],
|
|
@@ -1264,7 +1255,6 @@ const editPullRequest = async (transport, { ownerRepo, number, edit }, options =
|
|
|
1264
1255
|
await transport.rest({
|
|
1265
1256
|
method: "POST",
|
|
1266
1257
|
path: `${pullPath}/comments`,
|
|
1267
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1268
1258
|
body: { commit_id: edit.commitId, ...restComment(edit.comment) }
|
|
1269
1259
|
});
|
|
1270
1260
|
return null;
|
package/build/index-node.mjs
CHANGED
|
@@ -1023,9 +1023,7 @@ const restComment = (comment) => ({
|
|
|
1023
1023
|
line: comment.line,
|
|
1024
1024
|
side: comment.side,
|
|
1025
1025
|
...comment.startLine === null || comment.startSide === null ? {} : {
|
|
1026
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1027
1026
|
start_line: comment.startLine,
|
|
1028
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1029
1027
|
start_side: comment.startSide
|
|
1030
1028
|
}
|
|
1031
1029
|
});
|
|
@@ -1091,7 +1089,6 @@ const editPullRequest = async (transport, { ownerRepo, number, edit }, options =
|
|
|
1091
1089
|
await transport.rest({
|
|
1092
1090
|
method: "POST",
|
|
1093
1091
|
path: `${pullPath}/requested_reviewers`,
|
|
1094
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1095
1092
|
body: { reviewers: edit.add, team_reviewers: edit.addTeams }
|
|
1096
1093
|
});
|
|
1097
1094
|
}
|
|
@@ -1099,7 +1096,6 @@ const editPullRequest = async (transport, { ownerRepo, number, edit }, options =
|
|
|
1099
1096
|
await transport.rest({
|
|
1100
1097
|
method: "DELETE",
|
|
1101
1098
|
path: `${pullPath}/requested_reviewers`,
|
|
1102
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1103
1099
|
body: { reviewers: edit.remove, team_reviewers: edit.removeTeams }
|
|
1104
1100
|
});
|
|
1105
1101
|
}
|
|
@@ -1147,13 +1143,10 @@ const editPullRequest = async (transport, { ownerRepo, number, edit }, options =
|
|
|
1147
1143
|
method: "PUT",
|
|
1148
1144
|
path: `${pullPath}/merge`,
|
|
1149
1145
|
body: {
|
|
1150
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1151
1146
|
merge_method: edit.method,
|
|
1152
1147
|
sha: edit.expectedHeadSha,
|
|
1153
1148
|
...edit.commitMessage === void 0 ? {} : {
|
|
1154
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1155
1149
|
commit_title: edit.commitMessage.title,
|
|
1156
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1157
1150
|
commit_message: edit.commitMessage.body
|
|
1158
1151
|
}
|
|
1159
1152
|
}
|
|
@@ -1164,7 +1157,6 @@ const editPullRequest = async (transport, { ownerRepo, number, edit }, options =
|
|
|
1164
1157
|
await transport.rest({
|
|
1165
1158
|
method: "PUT",
|
|
1166
1159
|
path: `${pullPath}/update-branch`,
|
|
1167
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1168
1160
|
body: { expected_head_sha: edit.expectedHeadSha }
|
|
1169
1161
|
});
|
|
1170
1162
|
return null;
|
|
@@ -1244,7 +1236,6 @@ const editPullRequest = async (transport, { ownerRepo, number, edit }, options =
|
|
|
1244
1236
|
method: "POST",
|
|
1245
1237
|
path: `${pullPath}/reviews`,
|
|
1246
1238
|
body: {
|
|
1247
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1248
1239
|
commit_id: edit.commitId,
|
|
1249
1240
|
...edit.body === "" ? {} : { body: edit.body },
|
|
1250
1241
|
event: reviewEventNames[edit.event],
|
|
@@ -1264,7 +1255,6 @@ const editPullRequest = async (transport, { ownerRepo, number, edit }, options =
|
|
|
1264
1255
|
await transport.rest({
|
|
1265
1256
|
method: "POST",
|
|
1266
1257
|
path: `${pullPath}/comments`,
|
|
1267
|
-
// eslint-disable-next-line camelcase -- GitHub's field name
|
|
1268
1258
|
body: { commit_id: edit.commitId, ...restComment(edit.comment) }
|
|
1269
1259
|
});
|
|
1270
1260
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reviewflow/sdk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.22.0",
|
|
4
4
|
"description": "pull request model shared by the reviewflow app server and its ui: diff and api types, pure utils, the GitHub layer behind an injected transport, and (node only) reading a diff from a local checkout (@reviewflow/sdk/git) and editing a text file in place (@reviewflow/sdk/files)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"code-review",
|
|
@@ -61,19 +61,6 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"scripts": {
|
|
65
|
-
"build": "pnpm run clean:build && rollup --config rollup.config.mjs",
|
|
66
|
-
"clean": "pnpm run clean:build",
|
|
67
|
-
"clean:build": "pob-esbuild-clean-out build",
|
|
68
|
-
"lint": "pnpm run lint:oxlint && pnpm run lint:eslint",
|
|
69
|
-
"lint:eslint": "pnpm --dir '../..' exec eslint --quiet 'packages/sdk'",
|
|
70
|
-
"lint:oxlint": "pnpm --dir '../..' exec oxlint --quiet 'packages/sdk'",
|
|
71
|
-
"start": "pnpm run clean:build && rollup --config rollup.config.mjs --watch",
|
|
72
|
-
"test": "pnpm run --dir '../..' test -- 'packages/sdk'",
|
|
73
|
-
"tsc": "tsrs",
|
|
74
|
-
"tsc:go": "tsc",
|
|
75
|
-
"watch": "pnpm run clean:build && rollup --config rollup.config.mjs --watch"
|
|
76
|
-
},
|
|
77
64
|
"dependencies": {
|
|
78
65
|
"oxc-parser": "0.127.0"
|
|
79
66
|
},
|
|
@@ -134,5 +121,18 @@
|
|
|
134
121
|
}
|
|
135
122
|
],
|
|
136
123
|
"typescript": true
|
|
124
|
+
},
|
|
125
|
+
"scripts": {
|
|
126
|
+
"build": "pnpm run clean:build && rollup --config rollup.config.mjs",
|
|
127
|
+
"clean": "pnpm run clean:build",
|
|
128
|
+
"clean:build": "pob-esbuild-clean-out build",
|
|
129
|
+
"lint": "pnpm run lint:oxlint && pnpm run lint:eslint",
|
|
130
|
+
"lint:eslint": "pnpm --dir '../..' exec eslint --quiet 'packages/sdk'",
|
|
131
|
+
"lint:oxlint": "pnpm --dir '../..' exec oxlint --quiet 'packages/sdk'",
|
|
132
|
+
"start": "pnpm run clean:build && rollup --config rollup.config.mjs --watch",
|
|
133
|
+
"test": "pnpm run --dir '../..' test -- 'packages/sdk'",
|
|
134
|
+
"tsc": "tsrs",
|
|
135
|
+
"tsc:go": "tsc",
|
|
136
|
+
"watch": "pnpm run clean:build && rollup --config rollup.config.mjs --watch"
|
|
137
137
|
}
|
|
138
|
-
}
|
|
138
|
+
}
|