@insignia-education/api-sdk-js 0.16.26 → 0.17.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/package.json +1 -1
- package/src/api/v1/Admin.js +13 -0
package/package.json
CHANGED
package/src/api/v1/Admin.js
CHANGED
|
@@ -185,6 +185,19 @@ export default class Admin {
|
|
|
185
185
|
return this.#client.post(`/admin/actions/${repo}/jobs/${jobId}/rerun`);
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
/** Full review context for one pull request: body, files, comments/reviews and checks. */
|
|
189
|
+
actionsPullRequest(repo, pullNumber) {
|
|
190
|
+
return this.#client.get(`/admin/actions/${repo}/pulls/${pullNumber}`);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/** Merge the exact reviewed head SHA using GitHub's merge, squash or rebase strategy. */
|
|
194
|
+
actionsMergePullRequest(repo, pullNumber, { sha, mergeMethod }) {
|
|
195
|
+
return this.#client.post(`/admin/actions/${repo}/pulls/${pullNumber}/merge`, {
|
|
196
|
+
sha,
|
|
197
|
+
merge_method: mergeMethod,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
|
|
188
201
|
static #buildUrl(baseUrl, path, params) {
|
|
189
202
|
const qs = new URLSearchParams(
|
|
190
203
|
Object.entries(params).filter(([, v]) => v !== undefined && v !== null && v !== '')
|