Skip to content

Add Dependabot, outdated-deps, CodeQL, and scheduled CI issue automation - #51

Merged
Emiyaaaaa merged 2 commits into
mainfrom
cursor/github-actions-automation-4e28
Aug 23, 2026
Merged

Add Dependabot, outdated-deps, CodeQL, and scheduled CI issue automation#51
Emiyaaaaa merged 2 commits into
mainfrom
cursor/github-actions-automation-4e28

Conversation

@Emiyaaaaa

@Emiyaaaaa Emiyaaaaa commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

Adds GitHub automation for dependency upgrades and periodic bug discovery, per the 1C + 2C request:

  1. Dependabot (.github/dependabot.yml) — weekly PRs for npm (frontend), Maven (backend-java), pip (backend, integrations/pydantic-ai), and GitHub Actions.
  2. Outdated dependencies Issue (.github/workflows/outdated-deps.yml) — weekly scan that upserts a single [automation] Outdated dependencies Issue (npm / uv / Maven).
  3. CodeQL (.github/workflows/codeql.yml) — analyzes JS/TS, Python, and Java; on schedule, upserts [automation] CodeQL open alerts when alerts exist (closes it when clear).
  4. Scheduled CI Issues — extends existing CI with a daily cron; failures upsert [automation] Scheduled CI failure, and a green run closes that Issue.

Shared helpers live under scripts/ci/outdated_deps_report.sh and scripts/ci/upsert_automation_issue.sh.

Also fixes astral-sh/setup-uv caching to key on **/pyproject.toml because uv.lock is gitignored (this was already failing on main).

Notes

  • Code scanning alerts still appear under Security → Code scanning; the Issue is a summary for triage.
  • CodeQL on private repos needs GitHub Advanced Security (or a public repo).
  • Workflows are also workflow_dispatch-able for manual runs.
  • backend-java test failures related to multi-tenant auth / duplicate AgentflowProperties are pre-existing on main and are outside this PR’s scope; scheduled CI will correctly open Issues for them until fixed separately.

Test plan

  • Merge and confirm Dependabot appears under Insights → Dependency graph → Dependabot
  • Manually run Outdated dependencies and confirm an Issue is created/updated
  • Manually run CodeQL and confirm analysis completes (and Issue behavior matches alert count)
  • Confirm backend job gets past setup-uv (no missing uv.lock cache error)
  • Manually run CI via workflow_dispatch (or wait for schedule) and confirm failure/success Issue behavior
Open in Web Open in Cursor 

Wire weekly Dependabot PRs across npm/Maven/pip/Actions, a scheduled
outdated-dependency Issue report, CodeQL analysis with Issue summaries,
and daily CI that opens or closes automation Issues based on health.

Co-authored-by: Haozheng Li <emiya@emiya.com.cn>
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Key the uv cache on pyproject.toml manifests so CI and the outdated-deps
workflow no longer fail looking for a missing uv.lock.

Co-authored-by: Haozheng Li <emiya@emiya.com.cn>
@Emiyaaaaa
Emiyaaaaa marked this pull request as ready for review August 23, 2026 02:38
Copilot AI lite review requested due to automatic review settings August 23, 2026 02:38
@Emiyaaaaa
Emiyaaaaa merged commit 0bf0ceb into main Aug 23, 2026
6 of 8 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

There are a couple of automation logic/permissions issues that can lead to incorrect Issue closure and overly broad workflow token permissions.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds GitHub automation to proactively surface dependency drift, security findings (CodeQL), and scheduled CI health failures via standardized “[automation] …” Issues, plus Dependabot configuration for regular upgrade PRs.

Changes:

  • Add Dependabot config for npm, Maven, pip (pyproject-based), and GitHub Actions updates.
  • Add scheduled workflows to (a) generate an “Outdated dependencies” report Issue and (b) run CodeQL and upsert a summary Issue of open alerts.
  • Extend CI with a daily schedule and automation to open/refresh a failure Issue (and close it when green), plus shared helper scripts under scripts/ci/.
File summaries
File Description
scripts/ci/upsert_automation_issue.sh Adds a shared helper to create/update a single automation Issue by exact title match.
scripts/ci/outdated_deps_report.sh Adds a report generator for npm/uv/Maven outdated dependency output in markdown.
.github/workflows/outdated-deps.yml Weekly workflow to generate the outdated deps report and upsert a tracking Issue.
.github/workflows/codeql.yml CodeQL analysis for JS/TS, Python, Java plus a scheduled/manual Issue summarizing open code-scanning alerts.
.github/workflows/ci.yml Adds daily scheduled CI and automation to open/close a scheduled CI failure Issue; adjusts uv cache keying.
.github/dependabot.yml Enables weekly Dependabot PRs across ecosystems with basic grouping/labels.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 5
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +79 to +83
ALERTS_JSON="$(gh api \
-H "Accept: application/vnd.github+json" \
"/repos/${GITHUB_REPOSITORY}/code-scanning/alerts?state=open&per_page=100" \
|| echo '[]')"

Comment thread .github/workflows/ci.yml
Comment on lines +176 to +182
if: |
always() &&
github.event_name == 'schedule' &&
needs.backend.result == 'success' &&
needs.backend-java.result == 'success' &&
needs.integration.result == 'success' &&
needs.frontend.result == 'success'
Comment on lines +58 to +60
cd "$ROOT/backend"
uv sync --all-extras >/dev/null 2>&1
uv pip list --outdated >"$TMP/backend-pip.txt" 2>&1 || true
Comment thread .github/workflows/ci.yml
Comment on lines +12 to +14
permissions:
contents: read
issues: write
Comment on lines +13 to +18
permissions:
contents: read
security-events: write
issues: write
actions: read

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.

4 participants