Skip to content

Add explicit CodeQL workflow to prevent duplicate runs#15

Merged
sphildreth merged 3 commits intomainfrom
copilot/fix-codeql-actions-duplicate
Dec 20, 2025
Merged

Add explicit CodeQL workflow to prevent duplicate runs#15
sphildreth merged 3 commits intomainfrom
copilot/fix-codeql-actions-duplicate

Conversation

Copy link
Contributor

Copilot AI commented Dec 20, 2025

CodeQL was running twice on each push to main because GitHub's default "dynamic" workflow had redundant triggers configured.

Changes

  • Add .github/workflows/codeql.yml with explicit trigger configuration
    • Triggers: push to main, PRs to main, weekly schedule (Sunday midnight UTC)
    • Languages: C# and JavaScript/TypeScript
    • Timeout: 120 minutes
    • Replaces the dynamic workflow with repository-controlled configuration

This gives explicit control over when CodeQL runs and eliminates duplicate executions.

Original prompt

It looks like this repo is getting code-ql actions run twice with each push to main branch?


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 20, 2025 17:21
Co-authored-by: sphildreth <193334+sphildreth@users.noreply.github.com>
Co-authored-by: sphildreth <193334+sphildreth@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix duplicate CodeQL actions on main branch Add explicit CodeQL workflow to prevent duplicate runs Dec 20, 2025
Copilot AI requested a review from sphildreth December 20, 2025 17:26
@sphildreth sphildreth marked this pull request as ready for review December 20, 2025 17:28
Copilot AI review requested due to automatic review settings December 20, 2025 17:28
@sphildreth sphildreth merged commit f7dee0a into main Dec 20, 2025
8 of 10 checks passed
@sphildreth sphildreth deleted the copilot/fix-codeql-actions-duplicate branch December 20, 2025 17:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an explicit CodeQL workflow configuration to prevent duplicate scan executions on pushes to the main branch. By creating a repository-controlled workflow file, it replaces GitHub's default dynamic workflow which was causing redundant runs.

Key Changes:

  • Explicit trigger configuration (push to main, PRs to main, weekly Sunday schedule)
  • Support for C# and JavaScript/TypeScript language scanning
  • 120-minute timeout with proper permissions for security events

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammatical error: "modify them (or add more) to build your code if your project, please refer to" should be "modify them (or add more) to build your code. If your project needs custom build steps, please refer to"

Suggested change
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# modify them (or add more) to build your code. If your project needs custom build steps, please refer to the EXAMPLE below for guidance.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants