Skip to content

feat: implement AI-based deployment job detection in workflows#970

Open
mertilginoglu wants to merge 4 commits intostagingfrom
feat/deploy-job-detection
Open

feat: implement AI-based deployment job detection in workflows#970
mertilginoglu wants to merge 4 commits intostagingfrom
feat/deploy-job-detection

Conversation

@mertilginoglu
Copy link
Copy Markdown
Contributor

  • Added WorkflowAiService for detecting deployment jobs using AI.
  • Integrated AI detection into ProjectSettingsComponent with UI updates.
  • Created backend service and controller for handling detection requests.
  • Added necessary DTOs and detection logic using OpenAI.
  • Updated environment configuration for AI integration.

Motivation

Description

Testing Instructions

Prerequisites:

  • GitHub Account without having any additional access-rights (e.g. admin, owner)
  • ...

Flow:

  1. Log in to Helios as a Developer
  2. Navigate to Settings
  3. ...

Screenshots

Checklist

General

Server

  • Code is performant and follows best practices
  • I documented the Java code using JavaDoc style.

Client

  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 15, 2026

Not up to standards ⛔

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🔴 Metrics 60 complexity

Metric Results
Complexity ⚠️ 60 (≤ 20 complexity)

View in Codacy

🟢 Coverage 29.76% diff coverage · -0.15% coverage variation

Metric Results
Coverage variation -0.15% coverage variation (-1.00%)
Diff coverage 29.76% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (7917aa6) 10244 4283 41.81%
Head commit (853b6e7) 10412 (+168) 4338 (+55) 41.66% (-0.15%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#970) 168 50 29.76%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

TIP This summary will be updated as you push new changes. Give us feedback

@github-actions github-actions bot added size:XXL and removed size:XL labels Apr 21, 2026
- Added WorkflowAiService for detecting deployment jobs using AI.
- Integrated AI detection into ProjectSettingsComponent with UI updates.
- Created backend service and controller for handling detection requests.
- Added necessary DTOs and detection logic using OpenAI.
- Updated environment configuration for AI integration.
@mertilginoglu mertilginoglu force-pushed the feat/deploy-job-detection branch from 078a61c to 853b6e7 Compare April 21, 2026 03:54
@mertilginoglu mertilginoglu marked this pull request as ready for review April 21, 2026 03:54
@mertilginoglu mertilginoglu requested a review from a team as a code owner April 21, 2026 03:54
@mertilginoglu
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 853b6e7a0f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

{
headers: {
...(token ? { Authorization: `Bearer ${token}` } : {}),
...(currentRepositoryId ? { 'X-Repository-Id': String(currentRepositoryId) } : {}),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use request repositoryId for X-Repository-Id header

This request builds the URL from the repositoryId argument but sets X-Repository-Id from repositoryService.currentRepositoryId(), so the path and authorization context can diverge. When they differ (for example during route transitions or if this service is reused with an explicit repository id), the backend computes roles from the header and can authorize against the wrong repository or return 403 for a valid maintainer request. Build the header from the same repositoryId argument used in the URL to keep permission checks consistent.

Useful? React with 👍 / 👎.

Comment on lines +307 to +309
const workflowId = this.detectingWorkflowId();
if (workflowId == null) {
return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Scope detection state to each mutation invocation

The mutation callbacks read and clear a single shared detectingWorkflowId, which races when users trigger detection on multiple workflows before earlier calls settle. In that case, one request can overwrite the id of another, causing errors to be recorded under the wrong workflow (or skipped entirely when onSettled from another call sets it to null first). Use per-invocation variables/context (onError(_, vars) and onSettled(_, _, vars)) or a per-workflow pending map instead of shared global state.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant