From 1297b4ac8ae978b99527048d04665063de028134 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Mar 2022 20:15:05 +0000 Subject: [PATCH] Add dist/index.js --- dist/index.js | 48 +++++++----------------------------------------- 1 file changed, 7 insertions(+), 41 deletions(-) diff --git a/dist/index.js b/dist/index.js index 178547ff..414cfab4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4129,45 +4129,10 @@ var axios_default = /*#__PURE__*/__webpack_require__.n(axios); // eslint-disable-next-line @typescript-eslint/no-var-requires const pkg = __webpack_require__(306); -/* -script='query { - repositoryOwner(login:\"danbst\") { - repositories(first: 100) { - edges { - node { - nameWithOwner - pullRequests(last: 100, states: OPEN) { - edges { - node { - title - url - author { - login - } - labels(first: 20) { - edges { - node { - name - } - } - } - } - } - } - } - } - } - } -}' -script="$(echo $script)" # the query should be a one-liner, without newlines - -curl -i -H 'Content-Type: application/json' \ - -H "Authorization: bearer ........." \ - -X POST -d "{ \"query\": \"$script\"}" https://api.github.com/graphql -*/ const github = axios_default().create({ - baseURL: `https://api.github.com/graphql`, + baseURL: `https://api.github.com/`, headers: { + accept: `application/vnd.github.v3+json`, authorization: `bearer ${process.env.GH_TOKEN}`, "user-agent": `${pkg.name}/${pkg.version}`, }, @@ -4250,8 +4215,8 @@ class Discussion extends Resource { repositoryId: this.repositoryId, categoryId: this.categoryId, }); - this.id = response.data.data.id; - this.url = response.data.data.url; + this.id = response.data.data.createDiscussion.discussion.id; + this.url = response.data.data.createDiscussion.discussion.url; this.debug(`Discussion Created id: ${this.id}, url: ${this.url}`); }); } @@ -4285,6 +4250,7 @@ function run() { core.setOutput("discussion-url", discussion.url); } catch (e) { + core.debug(e.stack); core.setFailed(e); } }); @@ -4298,7 +4264,7 @@ run(); /***/ ((module) => { "use strict"; -module.exports = JSON.parse("{\"_args\":[[\"axios@0.21.0\",\"/Users/abirismyname/Downloads/create-discussion\"]],\"_from\":\"axios@0.21.0\",\"_id\":\"axios@0.21.0\",\"_inBundle\":false,\"_integrity\":\"sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==\",\"_location\":\"/axios\",\"_phantomChildren\":{},\"_requested\":{\"type\":\"version\",\"registry\":true,\"raw\":\"axios@0.21.0\",\"name\":\"axios\",\"escapedName\":\"axios\",\"rawSpec\":\"0.21.0\",\"saveSpec\":null,\"fetchSpec\":\"0.21.0\"},\"_requiredBy\":[\"/\"],\"_resolved\":\"https://registry.npmjs.org/axios/-/axios-0.21.0.tgz\",\"_spec\":\"0.21.0\",\"_where\":\"/Users/abirismyname/Downloads/create-discussion\",\"author\":{\"name\":\"Matt Zabriskie\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}],\"dependencies\":{\"follow-redirects\":\"^1.10.0\"},\"description\":\"Promise based HTTP client for the browser and node.js\",\"devDependencies\":{\"bundlesize\":\"^0.17.0\",\"coveralls\":\"^3.0.0\",\"es6-promise\":\"^4.2.4\",\"grunt\":\"^1.0.2\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.1.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^20.1.0\",\"grunt-karma\":\"^2.0.0\",\"grunt-mocha-test\":\"^0.13.3\",\"grunt-ts\":\"^6.0.0-beta.19\",\"grunt-webpack\":\"^1.0.18\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^1.3.0\",\"karma-chrome-launcher\":\"^2.2.0\",\"karma-coverage\":\"^1.1.1\",\"karma-firefox-launcher\":\"^1.1.0\",\"karma-jasmine\":\"^1.1.1\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-opera-launcher\":\"^1.0.0\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^1.2.0\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.7\",\"karma-webpack\":\"^1.7.0\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"mocha\":\"^5.2.0\",\"sinon\":\"^4.5.0\",\"typescript\":\"^2.8.1\",\"url-search-params\":\"^0.10.0\",\"webpack\":\"^1.13.1\",\"webpack-dev-server\":\"^1.14.1\"},\"homepage\":\"https://github.com/axios/axios\",\"jsdelivr\":\"dist/axios.min.js\",\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"license\":\"MIT\",\"main\":\"index.js\",\"name\":\"axios\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/axios/axios.git\"},\"scripts\":{\"build\":\"NODE_ENV=production grunt build\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\",\"examples\":\"node ./examples/server.js\",\"fix\":\"eslint --fix lib/**/*.js\",\"postversion\":\"git push && git push --tags\",\"preversion\":\"npm test\",\"start\":\"node ./sandbox/server.js\",\"test\":\"grunt test && bundlesize\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\"},\"typings\":\"./index.d.ts\",\"unpkg\":\"dist/axios.min.js\",\"version\":\"0.21.0\"}"); +module.exports = JSON.parse("{\"name\":\"axios\",\"version\":\"0.21.0\",\"description\":\"Promise based HTTP client for the browser and node.js\",\"main\":\"index.js\",\"scripts\":{\"test\":\"grunt test && bundlesize\",\"start\":\"node ./sandbox/server.js\",\"build\":\"NODE_ENV=production grunt build\",\"preversion\":\"npm test\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\",\"postversion\":\"git push && git push --tags\",\"examples\":\"node ./examples/server.js\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\",\"fix\":\"eslint --fix lib/**/*.js\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/axios/axios.git\"},\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"author\":\"Matt Zabriskie\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"homepage\":\"https://github.com/axios/axios\",\"devDependencies\":{\"bundlesize\":\"^0.17.0\",\"coveralls\":\"^3.0.0\",\"es6-promise\":\"^4.2.4\",\"grunt\":\"^1.0.2\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.1.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^20.1.0\",\"grunt-karma\":\"^2.0.0\",\"grunt-mocha-test\":\"^0.13.3\",\"grunt-ts\":\"^6.0.0-beta.19\",\"grunt-webpack\":\"^1.0.18\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^1.3.0\",\"karma-chrome-launcher\":\"^2.2.0\",\"karma-coverage\":\"^1.1.1\",\"karma-firefox-launcher\":\"^1.1.0\",\"karma-jasmine\":\"^1.1.1\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-opera-launcher\":\"^1.0.0\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^1.2.0\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.7\",\"karma-webpack\":\"^1.7.0\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"mocha\":\"^5.2.0\",\"sinon\":\"^4.5.0\",\"typescript\":\"^2.8.1\",\"url-search-params\":\"^0.10.0\",\"webpack\":\"^1.13.1\",\"webpack-dev-server\":\"^1.14.1\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"jsdelivr\":\"dist/axios.min.js\",\"unpkg\":\"dist/axios.min.js\",\"typings\":\"./index.d.ts\",\"dependencies\":{\"follow-redirects\":\"^1.10.0\"},\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}],\"_resolved\":\"https://registry.npmjs.org/axios/-/axios-0.21.0.tgz\",\"_integrity\":\"sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==\",\"_from\":\"axios@0.21.0\"}"); /***/ }), @@ -4306,7 +4272,7 @@ module.exports = JSON.parse("{\"_args\":[[\"axios@0.21.0\",\"/Users/abirismyname /***/ ((module) => { "use strict"; -module.exports = JSON.parse("{\"name\":\"@abirismyname/create-discussion\",\"version\":\"1.0.0\",\"description\":\"Create a new GitHub Discussion with GitHub Actions\",\"main\":\"dist/index.js\",\"scripts\":{\"start\":\"node dist/index.js\",\"lint\":\"tsc --noEmit && eslint '*/**/*.{js,ts,tsx}'\",\"test\":\"jest\",\"build\":\"ncc build index.ts -o dist\"},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/abirismyname/create-discussion.git\"},\"keywords\":[],\"author\":\"Abir Majumdar (https://github.com/abirismyname)\",\"license\":\"ISC\",\"bugs\":{\"url\":\"https://github.com/abirismyname/create-discussion/issues\"},\"homepage\":\"https://github.com/abirismyname/create-discussion#readme\",\"devDependencies\":{\"@types/jest\":\"^26.0.19\",\"@types/node\":\"^14.14.10\",\"@typescript-eslint/eslint-plugin\":\"^4.9.1\",\"@typescript-eslint/parser\":\"^4.9.1\",\"@vercel/ncc\":\"^0.25.1\",\"eslint\":\"^7.15.0\",\"eslint-config-prettier\":\"^7.0.0\",\"eslint-plugin-prettier\":\"^3.2.0\",\"jest\":\"^26.6.3\",\"prettier\":\"^2.2.1\",\"tempy\":\"^1.0.0\",\"ts-jest\":\"^26.4.4\",\"typescript\":\"^4.1.2\"},\"dependencies\":{\"@actions/core\":\"^1.2.6\",\"axios\":\"^0.21.0\",\"base64-stream\":\"^1.0.0\",\"multistream\":\"^4.0.1\"}}"); +module.exports = JSON.parse("{\"name\":\"@abirismyname/create-discussion\",\"version\":\"1.0.0\",\"description\":\"Create a new GitHub Discussion with GitHub Actions\",\"main\":\"dist/index.js\",\"scripts\":{\"start\":\"node dist/index.js\",\"lint\":\"tsc --noEmit --skipLibCheck && eslint '*/**/*.{js,ts,tsx}'\",\"test\":\"jest\",\"build\":\"ncc build index.ts -o dist\"},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/abirismyname/create-discussion.git\"},\"keywords\":[],\"author\":\"Abir Majumdar (https://github.com/abirismyname)\",\"license\":\"ISC\",\"bugs\":{\"url\":\"https://github.com/abirismyname/create-discussion/issues\"},\"homepage\":\"https://github.com/abirismyname/create-discussion#readme\",\"devDependencies\":{\"@types/jest\":\"^26.0.19\",\"@types/node\":\"^14.14.10\",\"@typescript-eslint/eslint-plugin\":\"^4.9.1\",\"@typescript-eslint/parser\":\"^4.9.1\",\"@vercel/ncc\":\"^0.25.1\",\"eslint\":\"^7.15.0\",\"eslint-config-prettier\":\"^7.0.0\",\"eslint-plugin-prettier\":\"^3.2.0\",\"jest\":\"^26.6.3\",\"prettier\":\"^2.2.1\",\"tempy\":\"^1.0.0\",\"ts-jest\":\"^26.4.4\",\"typescript\":\"^4.1.2\"},\"dependencies\":{\"@actions/core\":\"^1.2.6\",\"axios\":\"^0.21.0\",\"base64-stream\":\"^1.0.0\",\"multistream\":\"^4.0.1\"}}"); /***/ }),