@@ -137748,7 +137748,11 @@ async function load (ctx) {
137748137748}
137749137749
137750137750function isModeAuto (config) {
137751- return (config && !isModeChatOps(config))
137751+ return (config && !isModeChatOps(config) && !isModeImmediate(config))
137752+ }
137753+
137754+ function isModeImmediate (config) {
137755+ return (config && config.mode && config.mode === 'immediate')
137752137756}
137753137757
137754137758function isModeChatOps (config) {
@@ -137924,6 +137928,7 @@ function isBreakingPr (labels, mapping) {
137924137928module.exports = {
137925137929 load: load,
137926137930 isModeAuto: isModeAuto,
137931+ isModeImmediate: isModeImmediate,
137927137932 isModeChatOps: isModeChatOps,
137928137933 getChatOpsCommandArgument: getChatOpsCommandArgument,
137929137934 autoCloseIssue: autoCloseIssue,
@@ -138712,6 +138717,7 @@ const utils = __nccwpck_require__(11608)
138712138717const PullRequest = __nccwpck_require__(17880)
138713138718const PullRequestClosed = __nccwpck_require__(26218)
138714138719const IssueAssigned = __nccwpck_require__(74777)
138720+ const IssueOpened = __nccwpck_require__(21951)
138715138721const CommentCreated = __nccwpck_require__(36855)
138716138722const MarketplacePurchase = __nccwpck_require__(41420)
138717138723const { version } = __nccwpck_require__(49554)
@@ -138744,7 +138750,7 @@ module.exports = (app, { getRouter }) => {
138744138750 })
138745138751 app.on('issues.opened', async ctx => {
138746138752 const comment = ctx.payload.issue.body
138747- await CommentCreated .handle(app, ctx, comment)
138753+ await IssueOpened .handle(app, ctx, comment)
138748138754 })
138749138755 app.on(['issues.labeled', 'issues.unlabeled'], async ctx => {
138750138756 await IssueLabeled.handle(app, ctx)
@@ -138905,8 +138911,8 @@ module.exports = {
138905138911/***/ ((module) => {
138906138912
138907138913const version = {
138908- "revision": "602e728 ",
138909- "date": "2023-11-25 "
138914+ "revision": "3869717 ",
138915+ "date": "2023-11-27 "
138910138916}
138911138917module.exports = { version: version }
138912138918
@@ -138923,7 +138929,8 @@ const utils = __nccwpck_require__(11608)
138923138929
138924138930async function handle (app, ctx, comment) {
138925138931 if (Config.isChatOpsCommand(comment)) {
138926- await chatOpsCommandGiven(app, ctx, comment)
138932+ const config = await Config.load(ctx)
138933+ await chatOpsCommandGiven(app, ctx, config, comment)
138927138934 }
138928138935}
138929138936
@@ -138940,12 +138947,10 @@ async function getBranchName (ctx, config, comment) {
138940138947 }
138941138948}
138942138949
138943- async function chatOpsCommandGiven (app, ctx, comment) {
138950+ async function chatOpsCommandGiven (app, ctx, config, comment) {
138944138951 app.log.debug('ChatOps command received')
138945- const config = await Config.load(ctx)
138946138952 if (!Config.isModeChatOps(config)) {
138947- app.log('Received ChatOps command but current mode is not `chatops`, exiting')
138948- return
138953+ app.log('Received ChatOps command but current mode is not `chatops`')
138949138954 }
138950138955 if (github.skipForIssue(ctx, config)) {
138951138956 app.log(`Skipping run for issue: ${context.getIssueTitle(ctx)}`)
@@ -138974,7 +138979,8 @@ async function chatOpsCommandGiven (app, ctx, comment) {
138974138979}
138975138980
138976138981module.exports = {
138977- handle: handle
138982+ handle: handle,
138983+ chatOpsCommandGiven: chatOpsCommandGiven
138978138984}
138979138985
138980138986
@@ -138995,6 +139001,11 @@ async function handle (app, ctx) {
138995139001 if (!Config.isModeAuto(config)) {
138996139002 return
138997139003 }
139004+ await issueAssigned(app, ctx, config)
139005+ utils.logMemoryUsage(app)
139006+ }
139007+
139008+ async function issueAssigned (app, ctx, config) {
138998139009 if (github.skipForIssue(ctx, config)) {
138999139010 app.log(`Skipping run for issue: ${context.getIssueTitle(ctx)}`)
139000139011 return
@@ -139020,11 +139031,11 @@ async function handle (app, ctx) {
139020139031 app.log(`Creating pull request for user ${assignee}`)
139021139032 await github.createPr(app, ctx, config, assignee, branchName)
139022139033 }
139023- utils.logMemoryUsage(app)
139024139034}
139025139035
139026139036module.exports = {
139027- handle: handle
139037+ handle: handle,
139038+ issueAssigned: issueAssigned
139028139039}
139029139040
139030139041
@@ -139059,6 +139070,29 @@ module.exports = {
139059139070}
139060139071
139061139072
139073+ /***/ }),
139074+
139075+ /***/ 21951:
139076+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
139077+
139078+ const Config = __nccwpck_require__(34570)
139079+ const { chatOpsCommandGiven } = __nccwpck_require__(36855)
139080+ const { issueAssigned } = __nccwpck_require__(74777)
139081+
139082+ async function handle (app, ctx, comment) {
139083+ const config = await Config.load(ctx)
139084+ if (Config.isModeImmediate(config)) {
139085+ await issueAssigned(app, ctx, config)
139086+ } else if (Config.isChatOpsCommand(comment)) {
139087+ await chatOpsCommandGiven(app, ctx, config, comment)
139088+ }
139089+ }
139090+
139091+ module.exports = {
139092+ handle: handle
139093+ }
139094+
139095+
139062139096/***/ }),
139063139097
139064139098/***/ 41420:
0 commit comments