Skip to content

Conversation

@taylordowns2000
Copy link
Member

@taylordowns2000 taylordowns2000 commented Oct 19, 2025

Description

This PR adds the missing methods for an updated GovStack-compliant API, closes #1656

Validation steps

  1. Using an API token, try out the new methods for runs, log_lines, and workflows (both scoped by project and unscoped)

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Pre-submission checklist

  • I have performed a self-review of my code.
  • I have implemented and tested all related authorization policies. (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

@github-project-automation github-project-automation bot moved this to New Issues in v2 Oct 19, 2025
@codecov
Copy link

codecov bot commented Oct 19, 2025

Codecov Report

❌ Patch coverage is 76.57143% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.51%. Comparing base (e78216a) to head (302dfc5).
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
lib/lightning/invocation/query.ex 83.52% 14 Missing ⚠️
...htning_web/controllers/api/workflows_controller.ex 0.00% 11 Missing ⚠️
...ib/lightning_web/controllers/api/run_controller.ex 70.58% 5 Missing ⚠️
...ning_web/controllers/api/work_orders_controller.ex 70.58% 5 Missing ⚠️
lib/lightning/workflows/query.ex 0.00% 3 Missing ⚠️
lib/lightning/workflows.ex 0.00% 1 Missing ⚠️
lib/lightning_web/controllers/api/run_json.ex 88.88% 1 Missing ⚠️
.../lightning_web/controllers/api/work_orders_json.ex 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3786      +/-   ##
==========================================
- Coverage   88.58%   88.51%   -0.07%     
==========================================
  Files         414      420       +6     
  Lines       17943    18116     +173     
==========================================
+ Hits        15895    16036     +141     
- Misses       2048     2080      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@taylordowns2000 taylordowns2000 marked this pull request as ready for review October 19, 2025 12:40
Copy link
Collaborator

@midigofrank midigofrank left a comment

Choose a reason for hiding this comment

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

@taylordowns2000 this looks great! I'm however worried that we ignore invalid timestamp values, was that part of the spec? I would prefer to have it return an error if the params are invalid.

Also could you add a few more tests for the other controllers?

@github-project-automation github-project-automation bot moved this from New Issues to In review in v2 Oct 22, 2025
@taylordowns2000 taylordowns2000 merged commit 5043e49 into main Oct 22, 2025
6 of 8 checks passed
@taylordowns2000 taylordowns2000 deleted the gs-api-2 branch October 22, 2025 15:28
@github-project-automation github-project-automation bot moved this from In review to Done in v2 Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Update RunController and JSON api for GovStack compliance

3 participants