Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

📋 Descrição

Follow-up to PR #2 addressing reviewer feedback on automation infrastructure. Fixes hardcoded CodeQL languages, documentation inaccuracies, and configuration inconsistencies.

O que mudou?

CodeQL Workflow (.github/workflows/codeql.yml):

  • Removed hardcoded language: ['javascript', 'python'] matrix
  • Enabled auto-detection for future-proof scanning across all supported languages

Documentation (docs/AUTOMATION.md):

  • Updated CodeQL section to reflect actual auto-detection behavior
  • Completed auto-label keyword lists with missing entries:
    • dependencies: added update package
    • All labels now show complete keyword mappings from workflow

CI Workflow (.github/workflows/ci.yml):

  • Go version: '1.21''1.21.x' for patch version flexibility

Dependabot (.github/dependabot.yml):

  • Added prefix-development: "chore" to Docker and Go modules ecosystems for consistency with npm/pip/actions

PR Template (.github/pull_request_template.md):

  • Reviewer placeholder: @@reviewer-username

Por quê?

Hardcoded languages in CodeQL contradict "automatic detection" claims in docs and prevent future language support. Documentation keyword tables were incomplete, missing several mappings actually used by auto-label workflow. Configuration inconsistencies across ecosystems reduce predictability.

✅ Checklist

  • O código segue os padrões do projeto
  • Testes foram executados e estão passando
  • Documentação foi atualizada (se aplicável)
  • Commits seguem o padrão Conventional Commits
  • Não há conflitos com a branch base
  • Revisão própria do código foi realizada
  • Comentários foram adicionados em áreas complexas (se necessário)

🔗 Issue Relacionada

Addresses #2 (review)

🎯 Impacto Esperado

Áreas Afetadas

  • Documentação
  • Automação/Scripts
  • Templates
  • CI/CD
  • Configuração do Projeto
  • Outro: ___________

Impacto de Risco

  • Baixo - Mudanças isoladas, sem impacto em funcionalidades existentes
  • Médio - Alterações que podem afetar funcionalidades existentes
  • Alto - Mudanças significativas que requerem atenção especial

📸 Capturas de Tela (se aplicável)

N/A - Configuration and documentation changes only

🧪 Como Testar

  1. Verify YAML syntax: python3 -c "import yaml; yaml.safe_load(open('.github/workflows/codeql.yml'))"
  2. Check CodeQL workflow runs without language matrix errors
  3. Confirm docs match actual workflow behavior
  4. Validate Dependabot commit messages use consistent prefixes

📝 Notas Adicionais

CodeQL auto-detection will analyze all supported languages found in repository (C++, C#, Go, Java, JavaScript, Python, Ruby, Swift) rather than limiting to JavaScript/Python. This makes the workflow future-proof as the repository evolves.

🔍 Revisores Sugeridos

@reviewer-username

Original prompt

Apply fixes requested in PR review thread #2 (review) (PR #2 was merged; create a follow-up PR against main).

Repository: danielnovais-tech/digital-transform-kit

Required changes (minimal diffs):

  1. Update .github/workflows/codeql.yml
  • Remove the hardcoded CodeQL language matrix (language: ['javascript','python']) that currently contradicts documentation.
  • Prefer CodeQL auto-detection so the workflow remains future-proof as the repo evolves.
  • Ensure the workflow does not create noisy failures when the repository has no supported language files; if necessary, add a lightweight conditional/precheck step/job to skip analysis when nothing applicable exists.
  1. Update docs/AUTOMATION.md
  • Fix the CodeQL documentation so it accurately reflects how languages are selected (no longer claim "automatically detected" while hardcoded).
  • Ensure the auto-label keyword lists and table accurately include ALL keywords actually used by .github/workflows/auto-label.yml.
    • Specifically include update package for the dependencies label.
    • Ensure missing keywords noted in review are present: enhancement: enhance, new; bugfix: patch, repair; documentation: guide, comment; refactor: optimize, improve.
  1. Update .github/pull_request_template.md
  • Replace the dangling @ placeholder under "Revisores Sugeridos" with a clearer placeholder (e.g., @reviewer-username) and/or guidance.
  1. Update .github/workflows/ci.yml
  • Change actions/setup-go go-version from '1.21' to '1.21.x'.
  1. Update .github/dependabot.yml
  • Add prefix-development: "chore" under commit-message for the Docker (package-ecosystem: "docker") and Go modules (package-ecosystem: "gomod") entries to match other ecosystems.

Acceptance criteria:

  • All modified YAML remains valid.
  • Documentation matches behavior and keyword mappings.
  • Changes are minimal and targeted to the review comments.

Context: PR #2 introduced repository hygiene/automation infrastructure; this PR is a follow-up addressing reviewer notes.

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: danielnovais-tech <230455320+danielnovais-tech@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CodeQL workflow and documentation following PR review fix: apply PR #2 review feedback - CodeQL auto-detection, docs accuracy Jan 23, 2026
@github-actions github-actions bot added bugfix ci dependencies documentation Improvements or additions to documentation enhancement New feature or request refactor size/S and removed size/S labels Jan 23, 2026
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@danielnovais-tech danielnovais-tech marked this pull request as ready for review January 23, 2026 19:20
Copilot AI review requested due to automatic review settings January 23, 2026 19:20
@danielnovais-tech danielnovais-tech merged commit d1027c1 into main Jan 23, 2026
15 of 16 checks passed
Copy link

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

Follow-up to PR #2 to align automation configuration and documentation, focusing on CodeQL language selection, label keyword mappings, and minor workflow/config consistency updates.

Changes:

  • Updated CodeQL workflow intent from hardcoded language matrix to “auto-detection” and adjusted docs accordingly.
  • Completed auto-label keyword lists/tables in docs/AUTOMATION.md (including update package).
  • Tweaked automation configs for consistency (Go 1.21.x, Dependabot commit message prefixing, PR template reviewer placeholder).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/AUTOMATION.md Updates CodeQL and auto-label documentation/keyword lists to match workflow behavior and reviewer feedback.
.github/workflows/codeql.yml Removes hardcoded language matrix and category, aiming for auto-detected scanning.
.github/workflows/ci.yml Uses 1.21.x for Go toolchain patch flexibility.
.github/pull_request_template.md Replaces dangling @ with a clearer reviewer placeholder.
.github/dependabot.yml Adds prefix-development: "chore" to Docker and Go module ecosystems for consistency.

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

Comment on lines 30 to +33
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you want to specify queries, uncomment below
# queries: security-and-quality
# Languages are automatically detected based on repository contents
# Supported: 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift'
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The github/codeql-action/init@v3 step no longer provides a with.languages input. The CodeQL init action expects explicit languages to analyze, so this workflow will fail at runtime rather than auto-detecting. Consider adding a lightweight detection step that outputs a comma-separated language list (or skips the job entirely when none are found) and pass that value to init.

Copilot uses AI. Check for mistakes.
- Reports findings to Security tab

**Languages**: JavaScript, Python (automatically detected)
**Languages**: Automatically detected (supports C++, C#, Go, Java, JavaScript, Python, Ruby, Swift)
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Within this doc, the CodeQL language description is now inconsistent: this section says languages are “automatically detected” and lists many languages, but later under Code Review Tools > CodeQL the doc still states “Languages: JavaScript, Python”. Update the later section (or consolidate to a single source of truth) so the document doesn’t contradict itself.

Suggested change
**Languages**: Automatically detected (supports C++, C#, Go, Java, JavaScript, Python, Ruby, Swift)
**Languages**: Automatically detected based on the CodeQL workflow configuration (currently JavaScript and Python)

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

bugfix ci dependencies documentation Improvements or additions to documentation enhancement New feature or request refactor size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants