Skip to content

Commit f6393cc

Browse files
david-wiggsCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent 8830f33 commit f6393cc

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,15 +639,15 @@ module.exports = (robot, { getRouter }, Settings = require('./lib/settings')) =>
639639

640640
robot.on('workflow_run.completed', async context => {
641641
const { payload } = context
642-
const { workflow_run, sender } = payload
642+
const { workflow_run } = payload
643643

644644
robot.log.debug(`Workflow run completed: ${workflow_run.name} in ${payload.repository.name}`)
645645

646646
// Check if this is a Code Scanning Default Setup workflow
647647
// These workflows have a specific path pattern
648648
if (workflow_run.path === 'dynamic/github-code-scanning/codeql') {
649649
robot.log.debug(`Code Scanning Default Setup workflow detected for ${payload.repository.name}`)
650-
650+
651651
// Trigger sync to validate code scanning configuration
652652
return syncSettings(false, context)
653653
}

lib/plugins/code_scanning.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
const ErrorStash = require('./errorStash')
22
const NopCommand = require('../nopcommand')
3-
const MergeDeep = require('../mergeDeep')
43

5-
const ignorableFields = []
64

75
/**
86
* Code Scanning plugin to manage GitHub Code Scanning Default Setup configuration
@@ -184,8 +182,8 @@ module.exports = class CodeScanning extends ErrorStash {
184182
if (normalizedAllowed.length > 0 && !normalizedAllowed.includes(lang)) {
185183
unauthorizedLanguages.push(lang)
186184
}
187-
// If language is in blocked list
188-
if (normalizedBlocked.includes(lang)) {
185+
// If language is in blocked list (but not already added above)
186+
else if (normalizedBlocked.includes(lang)) {
189187
unauthorizedLanguages.push(lang)
190188
}
191189
}

0 commit comments

Comments
 (0)