mirror of
https://github.com/charliegerard/safe-space.git
synced 2024-10-26 06:08:23 +03:00
make it simpler
This commit is contained in:
parent
9600b1dcdc
commit
5bdd04536c
@ -9,4 +9,4 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: "node12"
|
using: "node12"
|
||||||
main: "dist/index.js"
|
main: "index.js"
|
||||||
|
26883
dist/index.js
vendored
26883
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
99
index.js
Normal file
99
index.js
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
const core = require("@actions/core");
|
||||||
|
const github = require("@actions/github");
|
||||||
|
const { Octokit } = require("@octokit/rest");
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const tf = require("@tensorflow/tfjs");
|
||||||
|
const toxicity = require("@tensorflow-models/toxicity");
|
||||||
|
await tf.setBackend("cpu");
|
||||||
|
|
||||||
|
try {
|
||||||
|
const githubToken = core.getInput("GITHUB_TOKEN");
|
||||||
|
const octokit = new Octokit({ auth: githubToken });
|
||||||
|
const customMessage = core.getInput("message");
|
||||||
|
const toxicityThreshold = core.getInput("toxicity_threshold");
|
||||||
|
const { context } = github;
|
||||||
|
const repository = context.payload.repository;
|
||||||
|
const threshold = toxicityThreshold ? toxicityThreshold : 0.9;
|
||||||
|
|
||||||
|
if (context.payload.review && context.payload.action === "submitted") {
|
||||||
|
const issueNumber = context.payload.pull_request.number;
|
||||||
|
const model = await toxicity.load(threshold);
|
||||||
|
const reviewComment = [context.payload.review.body];
|
||||||
|
const reviewObject = context.payload.review;
|
||||||
|
let toxicComment = undefined;
|
||||||
|
model.classify(reviewComment).then((predictions) => {
|
||||||
|
predictions.forEach((prediction) => {
|
||||||
|
if (toxicComment) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
prediction.results.forEach((result, index) => {
|
||||||
|
if (toxicComment) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (result.match) {
|
||||||
|
const commentAuthor = reviewObject.user.login;
|
||||||
|
toxicComment = reviewComment[0];
|
||||||
|
const message = customMessage
|
||||||
|
? customMessage
|
||||||
|
: `<img src="https://media.giphy.com/media/3ohzdQ1IynzclJldUQ/giphy.gif" width="400"/> </br>
|
||||||
|
Hey @${commentAuthor}! 👋 <br/> PRs and issues should be safe environments but your comment: <strong>"${toxicComment}"</strong> was classified as potentially toxic! 😔</br>
|
||||||
|
Please consider spending a few seconds editing it and feel free to delete me afterwards! 🙂`;
|
||||||
|
|
||||||
|
return octokit.issues.createComment({
|
||||||
|
owner: repository.owner.login,
|
||||||
|
repo: repository.name,
|
||||||
|
issue_number: issueNumber,
|
||||||
|
body: message,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (context.payload.comment) {
|
||||||
|
if (
|
||||||
|
context.payload.action === "created" ||
|
||||||
|
context.payoad.action === "edited"
|
||||||
|
) {
|
||||||
|
const issueNumber = context.payload.issue.number;
|
||||||
|
const model = await toxicity.load(threshold);
|
||||||
|
const comment = [context.payload.comment.body];
|
||||||
|
const commentObject = context.payload.comment;
|
||||||
|
let toxicComment = undefined;
|
||||||
|
model.classify(comment).then((predictions) => {
|
||||||
|
predictions.forEach((prediction) => {
|
||||||
|
if (toxicComment) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
prediction.results.forEach((result, index) => {
|
||||||
|
if (toxicComment) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (result.match) {
|
||||||
|
const commentAuthor = commentObject.user.login;
|
||||||
|
toxicComment = commentObject.body;
|
||||||
|
const message = customMessage
|
||||||
|
? customMessage
|
||||||
|
: `<img src="https://media.giphy.com/media/3ohzdQ1IynzclJldUQ/giphy.gif" width="400"/> </br>
|
||||||
|
Hey @${commentAuthor}! 👋 <br/> PRs and issues should be safe environments but your comment: <strong>"${toxicComment}"</strong> was classified as potentially toxic! 😔</br>
|
||||||
|
Please consider spending a few seconds editing it and feel free to delete me afterwards! 🙂`;
|
||||||
|
|
||||||
|
return octokit.issues.createComment({
|
||||||
|
owner: repository.owner.login,
|
||||||
|
repo: repository.name,
|
||||||
|
issue_number: issueNumber,
|
||||||
|
body: message,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
core.setFailed(error.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
7
node_modules/@octokit/plugin-request-log/LICENSE
generated
vendored
Normal file
7
node_modules/@octokit/plugin-request-log/LICENSE
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
MIT License Copyright (c) 2020 Octokit contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
70
node_modules/@octokit/plugin-request-log/README.md
generated
vendored
Normal file
70
node_modules/@octokit/plugin-request-log/README.md
generated
vendored
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
# plugin-request-log.js
|
||||||
|
|
||||||
|
> Log all requests and request errors
|
||||||
|
|
||||||
|
[![@latest](https://img.shields.io/npm/v/@octokit/plugin-request-log.svg)](https://www.npmjs.com/package/@octokit/plugin-request-log)
|
||||||
|
[![Build Status](https://github.com/octokit/plugin-request-log.js/workflows/Test/badge.svg)](https://github.com/octokit/plugin-request-log.js/actions?workflow=Test)
|
||||||
|
[![Greenkeeper](https://badges.greenkeeper.io/octokit/plugin-request-log.js.svg)](https://greenkeeper.io/)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tbody valign=top align=left>
|
||||||
|
<tr><th>
|
||||||
|
Browsers
|
||||||
|
</th><td width=100%>
|
||||||
|
|
||||||
|
Load `@octokit/plugin-request-log` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.pika.dev](https://cdn.pika.dev)
|
||||||
|
|
||||||
|
```html
|
||||||
|
<script type="module">
|
||||||
|
import { Octokit } from "https://cdn.pika.dev/@octokit/core";
|
||||||
|
import { requestLog } from "https://cdn.pika.dev/@octokit/plugin-request-log";
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
|
||||||
|
</td></tr>
|
||||||
|
<tr><th>
|
||||||
|
Node
|
||||||
|
</th><td>
|
||||||
|
|
||||||
|
Install with `npm install @octokit/core @octokit/plugin-request-log`. Optionally replace `@octokit/core` with a core-compatible module
|
||||||
|
|
||||||
|
```js
|
||||||
|
const { Octokit } = require("@octokit/core");
|
||||||
|
const { requestLog } = require("@octokit/plugin-request-log");
|
||||||
|
```
|
||||||
|
|
||||||
|
</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
```js
|
||||||
|
const MyOctokit = Octokit.plugin(requestLog);
|
||||||
|
const octokit = new MyOctokit({ auth: "secret123" });
|
||||||
|
|
||||||
|
octokit.request("GET /");
|
||||||
|
// logs "GET / - 200 in 123ms
|
||||||
|
|
||||||
|
octokit.request("GET /oops");
|
||||||
|
// logs "GET / - 404 in 123ms
|
||||||
|
```
|
||||||
|
|
||||||
|
In order to log all request options, the `log.debug` option needs to be set. We recommend the [console-log-level](https://github.com/watson/console-log-level) package for a configurable log level
|
||||||
|
|
||||||
|
```js
|
||||||
|
const octokit = new MyOctokit({
|
||||||
|
log: require("console-log-level")({
|
||||||
|
auth: "secret123",
|
||||||
|
level: "info"
|
||||||
|
})
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[MIT](LICENSE)
|
30
node_modules/@octokit/plugin-request-log/dist-node/index.js
generated
vendored
Normal file
30
node_modules/@octokit/plugin-request-log/dist-node/index.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
Object.defineProperty(exports, '__esModule', { value: true });
|
||||||
|
|
||||||
|
const VERSION = "1.0.0";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param octokit Octokit instance
|
||||||
|
* @param options Options passed to Octokit constructor
|
||||||
|
*/
|
||||||
|
|
||||||
|
function requestLog(octokit) {
|
||||||
|
octokit.hook.wrap("request", (request, options) => {
|
||||||
|
octokit.log.debug("request", options);
|
||||||
|
const start = Date.now();
|
||||||
|
const requestOptions = octokit.request.endpoint.parse(options);
|
||||||
|
const path = requestOptions.url.replace(options.baseUrl, "");
|
||||||
|
return request(options).then(response => {
|
||||||
|
octokit.log.info(`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`);
|
||||||
|
return response;
|
||||||
|
}).catch(error => {
|
||||||
|
octokit.log.info(`${requestOptions.method} ${path} - ${error.status} in ${Date.now() - start}ms`);
|
||||||
|
throw error;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
requestLog.VERSION = VERSION;
|
||||||
|
|
||||||
|
exports.requestLog = requestLog;
|
||||||
|
//# sourceMappingURL=index.js.map
|
1
node_modules/@octokit/plugin-request-log/dist-node/index.js.map
generated
vendored
Normal file
1
node_modules/@octokit/plugin-request-log/dist-node/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"1.0.0\";\n","import { VERSION } from \"./version\";\n/**\n * @param octokit Octokit instance\n * @param options Options passed to Octokit constructor\n */\nexport function requestLog(octokit) {\n octokit.hook.wrap(\"request\", (request, options) => {\n octokit.log.debug(\"request\", options);\n const start = Date.now();\n const requestOptions = octokit.request.endpoint.parse(options);\n const path = requestOptions.url.replace(options.baseUrl, \"\");\n return request(options)\n .then(response => {\n octokit.log.info(`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`);\n return response;\n })\n .catch(error => {\n octokit.log.info(`${requestOptions.method} ${path} - ${error.status} in ${Date.now() -\n start}ms`);\n throw error;\n });\n });\n}\nrequestLog.VERSION = VERSION;\n"],"names":["VERSION","requestLog","octokit","hook","wrap","request","options","log","debug","start","Date","now","requestOptions","endpoint","parse","path","url","replace","baseUrl","then","response","info","method","status","catch","error"],"mappings":";;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACCP;;;;;AAIA,AAAO,SAASC,UAAT,CAAoBC,OAApB,EAA6B;AAChCA,EAAAA,OAAO,CAACC,IAAR,CAAaC,IAAb,CAAkB,SAAlB,EAA6B,CAACC,OAAD,EAAUC,OAAV,KAAsB;AAC/CJ,IAAAA,OAAO,CAACK,GAAR,CAAYC,KAAZ,CAAkB,SAAlB,EAA6BF,OAA7B;AACA,UAAMG,KAAK,GAAGC,IAAI,CAACC,GAAL,EAAd;AACA,UAAMC,cAAc,GAAGV,OAAO,CAACG,OAAR,CAAgBQ,QAAhB,CAAyBC,KAAzB,CAA+BR,OAA/B,CAAvB;AACA,UAAMS,IAAI,GAAGH,cAAc,CAACI,GAAf,CAAmBC,OAAnB,CAA2BX,OAAO,CAACY,OAAnC,EAA4C,EAA5C,CAAb;AACA,WAAOb,OAAO,CAACC,OAAD,CAAP,CACFa,IADE,CACGC,QAAQ,IAAI;AAClBlB,MAAAA,OAAO,CAACK,GAAR,CAAYc,IAAZ,CAAkB,GAAET,cAAc,CAACU,MAAO,IAAGP,IAAK,MAAKK,QAAQ,CAACG,MAAO,OAAMb,IAAI,CAACC,GAAL,KAAaF,KAAM,IAAhG;AACA,aAAOW,QAAP;AACH,KAJM,EAKFI,KALE,CAKIC,KAAK,IAAI;AAChBvB,MAAAA,OAAO,CAACK,GAAR,CAAYc,IAAZ,CAAkB,GAAET,cAAc,CAACU,MAAO,IAAGP,IAAK,MAAKU,KAAK,CAACF,MAAO,OAAMb,IAAI,CAACC,GAAL,KACtEF,KAAM,IADV;AAEA,YAAMgB,KAAN;AACH,KATM,CAAP;AAUH,GAfD;AAgBH;AACDxB,UAAU,CAACD,OAAX,GAAqBA,OAArB;;;;"}
|
24
node_modules/@octokit/plugin-request-log/dist-src/index.js
generated
vendored
Normal file
24
node_modules/@octokit/plugin-request-log/dist-src/index.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { VERSION } from "./version";
|
||||||
|
/**
|
||||||
|
* @param octokit Octokit instance
|
||||||
|
* @param options Options passed to Octokit constructor
|
||||||
|
*/
|
||||||
|
export function requestLog(octokit) {
|
||||||
|
octokit.hook.wrap("request", (request, options) => {
|
||||||
|
octokit.log.debug("request", options);
|
||||||
|
const start = Date.now();
|
||||||
|
const requestOptions = octokit.request.endpoint.parse(options);
|
||||||
|
const path = requestOptions.url.replace(options.baseUrl, "");
|
||||||
|
return request(options)
|
||||||
|
.then(response => {
|
||||||
|
octokit.log.info(`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`);
|
||||||
|
return response;
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
octokit.log.info(`${requestOptions.method} ${path} - ${error.status} in ${Date.now() -
|
||||||
|
start}ms`);
|
||||||
|
throw error;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
requestLog.VERSION = VERSION;
|
1
node_modules/@octokit/plugin-request-log/dist-src/version.js
generated
vendored
Normal file
1
node_modules/@octokit/plugin-request-log/dist-src/version.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export const VERSION = "1.0.0";
|
9
node_modules/@octokit/plugin-request-log/dist-types/index.d.ts
generated
vendored
Normal file
9
node_modules/@octokit/plugin-request-log/dist-types/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { Octokit } from "@octokit/core";
|
||||||
|
/**
|
||||||
|
* @param octokit Octokit instance
|
||||||
|
* @param options Options passed to Octokit constructor
|
||||||
|
*/
|
||||||
|
export declare function requestLog(octokit: Octokit): void;
|
||||||
|
export declare namespace requestLog {
|
||||||
|
var VERSION: string;
|
||||||
|
}
|
1
node_modules/@octokit/plugin-request-log/dist-types/version.d.ts
generated
vendored
Normal file
1
node_modules/@octokit/plugin-request-log/dist-types/version.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export declare const VERSION = "1.0.0";
|
28
node_modules/@octokit/plugin-request-log/dist-web/index.js
generated
vendored
Normal file
28
node_modules/@octokit/plugin-request-log/dist-web/index.js
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
const VERSION = "1.0.0";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param octokit Octokit instance
|
||||||
|
* @param options Options passed to Octokit constructor
|
||||||
|
*/
|
||||||
|
function requestLog(octokit) {
|
||||||
|
octokit.hook.wrap("request", (request, options) => {
|
||||||
|
octokit.log.debug("request", options);
|
||||||
|
const start = Date.now();
|
||||||
|
const requestOptions = octokit.request.endpoint.parse(options);
|
||||||
|
const path = requestOptions.url.replace(options.baseUrl, "");
|
||||||
|
return request(options)
|
||||||
|
.then(response => {
|
||||||
|
octokit.log.info(`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`);
|
||||||
|
return response;
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
octokit.log.info(`${requestOptions.method} ${path} - ${error.status} in ${Date.now() -
|
||||||
|
start}ms`);
|
||||||
|
throw error;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
requestLog.VERSION = VERSION;
|
||||||
|
|
||||||
|
export { requestLog };
|
||||||
|
//# sourceMappingURL=index.js.map
|
1
node_modules/@octokit/plugin-request-log/dist-web/index.js.map
generated
vendored
Normal file
1
node_modules/@octokit/plugin-request-log/dist-web/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"1.0.0\";\n","import { VERSION } from \"./version\";\n/**\n * @param octokit Octokit instance\n * @param options Options passed to Octokit constructor\n */\nexport function requestLog(octokit) {\n octokit.hook.wrap(\"request\", (request, options) => {\n octokit.log.debug(\"request\", options);\n const start = Date.now();\n const requestOptions = octokit.request.endpoint.parse(options);\n const path = requestOptions.url.replace(options.baseUrl, \"\");\n return request(options)\n .then(response => {\n octokit.log.info(`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`);\n return response;\n })\n .catch(error => {\n octokit.log.info(`${requestOptions.method} ${path} - ${error.status} in ${Date.now() -\n start}ms`);\n throw error;\n });\n });\n}\nrequestLog.VERSION = VERSION;\n"],"names":[],"mappings":"AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACC1C;AACA;AACA;AACA;AACA,AAAO,SAAS,UAAU,CAAC,OAAO,EAAE;AACpC,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK;AACvD,QAAQ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAC9C,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AACjC,QAAQ,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACvE,QAAQ,MAAM,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACrE,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC;AAC/B,aAAa,IAAI,CAAC,QAAQ,IAAI;AAC9B,YAAY,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;AACjH,YAAY,OAAO,QAAQ,CAAC;AAC5B,SAAS,CAAC;AACV,aAAa,KAAK,CAAC,KAAK,IAAI;AAC5B,YAAY,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE;AAChG,gBAAgB,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3B,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS,CAAC,CAAC;AACX,KAAK,CAAC,CAAC;AACP,CAAC;AACD,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;;;;"}
|
77
node_modules/@octokit/plugin-request-log/package.json
generated
vendored
Normal file
77
node_modules/@octokit/plugin-request-log/package.json
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
{
|
||||||
|
"_from": "@octokit/plugin-request-log@^1.0.0",
|
||||||
|
"_id": "@octokit/plugin-request-log@1.0.0",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw==",
|
||||||
|
"_location": "/@octokit/plugin-request-log",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "@octokit/plugin-request-log@^1.0.0",
|
||||||
|
"name": "@octokit/plugin-request-log",
|
||||||
|
"escapedName": "@octokit%2fplugin-request-log",
|
||||||
|
"scope": "@octokit",
|
||||||
|
"rawSpec": "^1.0.0",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "^1.0.0"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/@octokit/rest"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz",
|
||||||
|
"_shasum": "eef87a431300f6148c39a7f75f8cfeb218b2547e",
|
||||||
|
"_spec": "@octokit/plugin-request-log@^1.0.0",
|
||||||
|
"_where": "/Users/charlieg/Desktop/projects/github-action-toxic/node_modules/@octokit/rest",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/octokit/plugin-request-log.js/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"dependencies": {},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Log all requests and request errors",
|
||||||
|
"devDependencies": {
|
||||||
|
"@octokit/core": "^2.1.2",
|
||||||
|
"@pika/pack": "^0.5.0",
|
||||||
|
"@pika/plugin-build-node": "^0.8.1",
|
||||||
|
"@pika/plugin-build-web": "^0.8.1",
|
||||||
|
"@pika/plugin-ts-standard-pkg": "^0.8.1",
|
||||||
|
"@types/fetch-mock": "^7.3.2",
|
||||||
|
"@types/jest": "^24.0.25",
|
||||||
|
"@types/node": "^13.1.6",
|
||||||
|
"fetch-mock": "^8.3.1",
|
||||||
|
"jest": "^24.9.0",
|
||||||
|
"prettier": "^1.19.1",
|
||||||
|
"semantic-release": "^16.0.1",
|
||||||
|
"semantic-release-plugin-update-version-in-files": "^1.0.0",
|
||||||
|
"ts-jest": "^24.3.0",
|
||||||
|
"typescript": "^3.7.4"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist-*/",
|
||||||
|
"bin/"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/octokit/plugin-request-log.js#readme",
|
||||||
|
"keywords": [
|
||||||
|
"github",
|
||||||
|
"api",
|
||||||
|
"sdk",
|
||||||
|
"toolkit"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "dist-node/index.js",
|
||||||
|
"module": "dist-web/index.js",
|
||||||
|
"name": "@octokit/plugin-request-log",
|
||||||
|
"pika": true,
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/octokit/plugin-request-log.js.git"
|
||||||
|
},
|
||||||
|
"sideEffects": false,
|
||||||
|
"source": "dist-src/index.js",
|
||||||
|
"types": "dist-types/index.d.ts",
|
||||||
|
"version": "1.0.0"
|
||||||
|
}
|
22
node_modules/@octokit/rest/LICENSE
generated
vendored
Normal file
22
node_modules/@octokit/rest/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
The MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2012 Cloud9 IDE, Inc. (Mike de Boer)
|
||||||
|
Copyright (c) 2017-2018 Octokit contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
45
node_modules/@octokit/rest/README.md
generated
vendored
Normal file
45
node_modules/@octokit/rest/README.md
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# rest.js
|
||||||
|
|
||||||
|
> GitHub REST API client for JavaScript
|
||||||
|
|
||||||
|
[![@latest](https://img.shields.io/npm/v/@octokit/rest.svg)](https://www.npmjs.com/package/@octokit/rest)
|
||||||
|
[![Build Status](https://github.com/octokit/rest.js/workflows/Test/badge.svg)](https://github.com/octokit/rest.js/actions?query=workflow%3ATest+branch%3Amaster)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```shell
|
||||||
|
npm install @octokit/rest
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```js
|
||||||
|
const { Octokit } = require("@octokit/rest");
|
||||||
|
const octokit = new Octokit();
|
||||||
|
|
||||||
|
// Compare: https://developer.github.com/v3/repos/#list-organization-repositories
|
||||||
|
octokit.repos
|
||||||
|
.listForOrg({
|
||||||
|
org: "octokit",
|
||||||
|
type: "public",
|
||||||
|
})
|
||||||
|
.then(({ data }) => {
|
||||||
|
// handle data
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
See https://octokit.github.io/rest.js/ for full documentation.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
We would love you to contribute to `@octokit/rest`, pull requests are very welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
|
||||||
|
`@octokit/rest` was originally created as [`node-github`](https://www.npmjs.com/package/github) in 2012 by Mike de Boer from Cloud9 IDE, Inc.
|
||||||
|
|
||||||
|
It was adopted and renamed by GitHub in 2017
|
||||||
|
|
||||||
|
## LICENSE
|
||||||
|
|
||||||
|
[MIT](LICENSE)
|
17
node_modules/@octokit/rest/dist-node/index.js
generated
vendored
Normal file
17
node_modules/@octokit/rest/dist-node/index.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
Object.defineProperty(exports, '__esModule', { value: true });
|
||||||
|
|
||||||
|
var core = require('@octokit/core');
|
||||||
|
var pluginRequestLog = require('@octokit/plugin-request-log');
|
||||||
|
var pluginPaginateRest = require('@octokit/plugin-paginate-rest');
|
||||||
|
var pluginRestEndpointMethods = require('@octokit/plugin-rest-endpoint-methods');
|
||||||
|
|
||||||
|
const VERSION = "18.0.3";
|
||||||
|
|
||||||
|
const Octokit = core.Octokit.plugin(pluginRequestLog.requestLog, pluginRestEndpointMethods.restEndpointMethods, pluginPaginateRest.paginateRest).defaults({
|
||||||
|
userAgent: `octokit-rest.js/${VERSION}`
|
||||||
|
});
|
||||||
|
|
||||||
|
exports.Octokit = Octokit;
|
||||||
|
//# sourceMappingURL=index.js.map
|
1
node_modules/@octokit/rest/dist-node/index.js.map
generated
vendored
Normal file
1
node_modules/@octokit/rest/dist-node/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"18.0.3\";\n","import { Octokit as Core } from \"@octokit/core\";\nimport { requestLog } from \"@octokit/plugin-request-log\";\nimport { paginateRest } from \"@octokit/plugin-paginate-rest\";\nimport { restEndpointMethods } from \"@octokit/plugin-rest-endpoint-methods\";\nimport { VERSION } from \"./version\";\nexport const Octokit = Core.plugin(requestLog, restEndpointMethods, paginateRest).defaults({\n userAgent: `octokit-rest.js/${VERSION}`,\n});\n"],"names":["VERSION","Octokit","Core","plugin","requestLog","restEndpointMethods","paginateRest","defaults","userAgent"],"mappings":";;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;MCKMC,OAAO,GAAGC,YAAI,CAACC,MAAL,CAAYC,2BAAZ,EAAwBC,6CAAxB,EAA6CC,+BAA7C,EAA2DC,QAA3D,CAAoE;AACvFC,EAAAA,SAAS,EAAG,mBAAkBR,OAAQ;AADiD,CAApE,CAAhB;;;;"}
|
8
node_modules/@octokit/rest/dist-src/index.js
generated
vendored
Normal file
8
node_modules/@octokit/rest/dist-src/index.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { Octokit as Core } from "@octokit/core";
|
||||||
|
import { requestLog } from "@octokit/plugin-request-log";
|
||||||
|
import { paginateRest } from "@octokit/plugin-paginate-rest";
|
||||||
|
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
||||||
|
import { VERSION } from "./version";
|
||||||
|
export const Octokit = Core.plugin(requestLog, restEndpointMethods, paginateRest).defaults({
|
||||||
|
userAgent: `octokit-rest.js/${VERSION}`,
|
||||||
|
});
|
1
node_modules/@octokit/rest/dist-src/version.js
generated
vendored
Normal file
1
node_modules/@octokit/rest/dist-src/version.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export const VERSION = "18.0.3";
|
13
node_modules/@octokit/rest/dist-types/index.d.ts
generated
vendored
Normal file
13
node_modules/@octokit/rest/dist-types/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { Octokit as Core } from "@octokit/core";
|
||||||
|
export { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods";
|
||||||
|
export declare const Octokit: (new (...args: any[]) => {
|
||||||
|
[x: string]: any;
|
||||||
|
}) & {
|
||||||
|
new (...args: any[]): {
|
||||||
|
[x: string]: any;
|
||||||
|
};
|
||||||
|
plugins: any[];
|
||||||
|
} & typeof Core & import("@octokit/core/dist-types/types").Constructor<void & {
|
||||||
|
paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
|
||||||
|
} & import("@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types").RestEndpointMethods>;
|
||||||
|
export declare type Octokit = InstanceType<typeof Octokit>;
|
1
node_modules/@octokit/rest/dist-types/version.d.ts
generated
vendored
Normal file
1
node_modules/@octokit/rest/dist-types/version.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export declare const VERSION = "18.0.3";
|
13
node_modules/@octokit/rest/dist-web/index.js
generated
vendored
Normal file
13
node_modules/@octokit/rest/dist-web/index.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { Octokit as Octokit$1 } from '@octokit/core';
|
||||||
|
import { requestLog } from '@octokit/plugin-request-log';
|
||||||
|
import { paginateRest } from '@octokit/plugin-paginate-rest';
|
||||||
|
import { restEndpointMethods } from '@octokit/plugin-rest-endpoint-methods';
|
||||||
|
|
||||||
|
const VERSION = "18.0.3";
|
||||||
|
|
||||||
|
const Octokit = Octokit$1.plugin(requestLog, restEndpointMethods, paginateRest).defaults({
|
||||||
|
userAgent: `octokit-rest.js/${VERSION}`,
|
||||||
|
});
|
||||||
|
|
||||||
|
export { Octokit };
|
||||||
|
//# sourceMappingURL=index.js.map
|
1
node_modules/@octokit/rest/dist-web/index.js.map
generated
vendored
Normal file
1
node_modules/@octokit/rest/dist-web/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"18.0.3\";\n","import { Octokit as Core } from \"@octokit/core\";\nimport { requestLog } from \"@octokit/plugin-request-log\";\nimport { paginateRest } from \"@octokit/plugin-paginate-rest\";\nimport { restEndpointMethods } from \"@octokit/plugin-rest-endpoint-methods\";\nimport { VERSION } from \"./version\";\nexport const Octokit = Core.plugin(requestLog, restEndpointMethods, paginateRest).defaults({\n userAgent: `octokit-rest.js/${VERSION}`,\n});\n"],"names":["Core"],"mappings":";;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACK9B,MAAC,OAAO,GAAGA,SAAI,CAAC,MAAM,CAAC,UAAU,EAAE,mBAAmB,EAAE,YAAY,CAAC,CAAC,QAAQ,CAAC;AAC3F,IAAI,SAAS,EAAE,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC,CAAC;;;;"}
|
102
node_modules/@octokit/rest/package.json
generated
vendored
Normal file
102
node_modules/@octokit/rest/package.json
generated
vendored
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
{
|
||||||
|
"_from": "@octokit/rest",
|
||||||
|
"_id": "@octokit/rest@18.0.3",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-GubgemnLvUJlkhouTM2BtX+g/voYT/Mqh0SASGwTnLvSkW1irjt14N911/ABb6m1Hru0TwScOgFgMFggp3igfQ==",
|
||||||
|
"_location": "/@octokit/rest",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "tag",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "@octokit/rest",
|
||||||
|
"name": "@octokit/rest",
|
||||||
|
"escapedName": "@octokit%2frest",
|
||||||
|
"scope": "@octokit",
|
||||||
|
"rawSpec": "",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "latest"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"#USER",
|
||||||
|
"/"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.0.3.tgz",
|
||||||
|
"_shasum": "96a15ddb3a38dca5de9d75121378d6aa4a234fa5",
|
||||||
|
"_spec": "@octokit/rest",
|
||||||
|
"_where": "/Users/charlieg/Desktop/projects/github-action-toxic",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/octokit/rest.js/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"name": "Mike de Boer",
|
||||||
|
"email": "info@mikedeboer.nl"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Fabian Jakobs",
|
||||||
|
"email": "fabian@c9.io"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Joe Gallo",
|
||||||
|
"email": "joe@brassafrax.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gregor Martynus",
|
||||||
|
"url": "https://github.com/gr2m"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/core": "^3.0.0",
|
||||||
|
"@octokit/plugin-paginate-rest": "^2.2.0",
|
||||||
|
"@octokit/plugin-request-log": "^1.0.0",
|
||||||
|
"@octokit/plugin-rest-endpoint-methods": "4.1.2"
|
||||||
|
},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "GitHub REST API client for Node.js",
|
||||||
|
"devDependencies": {
|
||||||
|
"@octokit/auth": "^2.0.0",
|
||||||
|
"@octokit/fixtures-server": "^6.0.0",
|
||||||
|
"@octokit/request": "^5.2.0",
|
||||||
|
"@pika/pack": "^0.5.0",
|
||||||
|
"@pika/plugin-build-node": "^0.9.2",
|
||||||
|
"@pika/plugin-build-web": "^0.9.2",
|
||||||
|
"@pika/plugin-ts-standard-pkg": "^0.9.2",
|
||||||
|
"@types/jest": "^26.0.0",
|
||||||
|
"@types/node": "^14.0.1",
|
||||||
|
"fetch-mock": "^9.0.0",
|
||||||
|
"jest": "^25.1.0",
|
||||||
|
"prettier": "^2.0.0",
|
||||||
|
"semantic-release": "^17.0.0",
|
||||||
|
"semantic-release-plugin-update-version-in-files": "^1.0.0",
|
||||||
|
"ts-jest": "^25.2.0",
|
||||||
|
"typescript": "^3.7.5"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist-*/",
|
||||||
|
"bin/"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/octokit/rest.js#readme",
|
||||||
|
"keywords": [
|
||||||
|
"octokit",
|
||||||
|
"github",
|
||||||
|
"rest",
|
||||||
|
"api-client"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "dist-node/index.js",
|
||||||
|
"module": "dist-web/index.js",
|
||||||
|
"name": "@octokit/rest",
|
||||||
|
"pika": true,
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/octokit/rest.js.git"
|
||||||
|
},
|
||||||
|
"sideEffects": false,
|
||||||
|
"source": "dist-src/index.js",
|
||||||
|
"types": "dist-types/index.d.ts",
|
||||||
|
"version": "18.0.3"
|
||||||
|
}
|
@ -2,10 +2,11 @@
|
|||||||
"name": "safe-space",
|
"name": "safe-space",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "A Github action to detect the toxicity of comments in PRs and issues",
|
"description": "A Github action to detect the toxicity of comments in PRs and issues",
|
||||||
"main": "dist/index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.4",
|
"@actions/core": "^1.2.4",
|
||||||
"@actions/github": "^4.0.0",
|
"@actions/github": "^4.0.0",
|
||||||
|
"@octokit/rest": "^18.0.3",
|
||||||
"@tensorflow-models/toxicity": "^1.2.2",
|
"@tensorflow-models/toxicity": "^1.2.2",
|
||||||
"@tensorflow/tfjs": "^2.3.0"
|
"@tensorflow/tfjs": "^2.3.0"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user