@@ -23670,19 +23670,6 @@ function wrappy (fn, cb) {
23670
23670
/***/ 6092:
23671
23671
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
23672
23672
23673
- // const {Octokit} = require("@octokit/core")
23674
- // let octokit = new Octokit({auth: process.env.shamshir_pat})
23675
- //
23676
- // const core = require('@actions/core')
23677
- // const github = require('@actions/github')
23678
- // const GITHUB_TOKEN = core.getInput('GITHUB_TOKEN')
23679
- // if (!process.env.shamshir_pat) {
23680
- // octokit = github.getOctokit(GITHUB_TOKEN)
23681
- // }
23682
- // const {context = {}} = github
23683
- // const {pull_request} = context.payload
23684
- //
23685
-
23686
23673
const { Octokit } = __nccwpck_require__(6762)
23687
23674
const core = __nccwpck_require__(2186)
23688
23675
const github = __nccwpck_require__(5438)
@@ -23711,6 +23698,7 @@ module.exports = class Shamshir {
23711
23698
this._quorum = core.getInput('quorum')
23712
23699
this._mode = false
23713
23700
} else {
23701
+ // TODO: error-handing, TBD
23714
23702
// Neither stand-alone nor github actions
23715
23703
}
23716
23704
}
@@ -23753,11 +23741,15 @@ module.exports = class Shamshir {
23753
23741
level: 'error', message: `${error}`, owner: owner, repo: repo, function: 'main', mode: mode })
23754
23742
} finally {
23755
23743
// TODO: fix this
23756
- const fs = __nccwpck_require__(7147)
23757
- fs.readFile('combined.log', 'utf-8', (err, files) => {
23758
- if (err) { throw err; }
23759
- core.setOutput('log', files)
23760
- })
23744
+ if (GITHUB_TOKEN) {
23745
+ const fs = __nccwpck_require__(7147)
23746
+ fs.readFile('combined.log', 'utf-8', (err, files) => {
23747
+ if (err) {
23748
+ throw err;
23749
+ }
23750
+ core.setOutput('log', files)
23751
+ })
23752
+ }
23761
23753
logger.log({level: 'info', message: 'Shamshir finished.', owner: owner, repo: repo, mode: mode })
23762
23754
}
23763
23755
}
0 commit comments