Skip to content

Commit e8e218e

Browse files
dklibanclaude
andauthored
feat: add SDLC pipeline for automated issue-to-merge workflow (#1073)
* feat: add SDLC pipeline for automated issue-to-merge workflow Adds a full SDLC pipeline triggered by the 'agentic-sdlc' label on GitHub issues or Jira tickets. The pipeline implements changes, creates a PR, waits for CI, fixes failures, runs code and security reviews, handles revisions, and merges on approval. New agents: SDLC Developer, SDLC Security Reviewer Updated: pulp-service-contributor profile (added create_pr_draft, create_comment) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: address review feedback on SDLC pipeline - Fix test path: pytest pulp_service/pulp_service/tests/functional/ - Add PR and repo context to security reviewer prompt so it knows which PR to review - Enrich create-pr body with issue URL and implementation summary Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: clarify that SDLC Developer should not create PRs The pipeline's bridge action handles PR creation. The developer agent should only commit and push to the branch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: remove security review step from SDLC pipeline Security analysis is not needed for this pipeline. Removed the security-review step, the sdlc-security-reviewer task, and simplified the revision and merge dependencies to only depend on code-review. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: revert contributor security profile to original permissions The bridge handles PR creation and commenting, so the contributor agent doesn't need create_pr_draft or create_comment permissions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e2eb069 commit e8e218e

2 files changed

Lines changed: 133 additions & 0 deletions

File tree

.alcove/tasks/sdlc-developer.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: SDLC Developer
2+
description: Implements changes described in the issue context. Used by the SDLC workflow.
3+
4+
repos:
5+
- url: https://github.com/pulp/pulp-service.git
6+
7+
prompt: |
8+
Workflow Context (from previous steps):
9+
issue_number: {{issue_number}}
10+
repo: {{repo}}
11+
branch: {{branch}}
12+
13+
You are a developer for the pulp-service project (a Django REST Framework
14+
plugin for Pulpcore that extends the Pulp content management platform).
15+
16+
First, read the issue details by running: gh issue view {{issue_number}} -R {{repo}}
17+
18+
Then implement the changes described in the issue:
19+
- Follow existing code patterns in pulp_service/
20+
- Use Black formatter with line length 100
21+
- Run tests with: pytest pulp_service/pulp_service/tests/functional/
22+
- Commit and push your work to the branch specified in the Workflow Context
23+
- Do NOT create a PR — the pipeline handles PR creation automatically
24+
25+
Key project conventions:
26+
- Source code lives in pulp_service/pulp_service/app/
27+
- Tests are in pulp_service/pulp_service/tests/functional/
28+
- Three-service architecture: pulp-api, pulp-content, pulp-worker
29+
- Authentication uses X-RH-IDENTITY header
30+
- Multi-tenancy via DomainOrg model
31+
32+
Output: {"summary": "what you implemented"}
33+
34+
timeout: 3600
35+
36+
dev_container:
37+
image: ghcr.io/pulp/hosted-pulp-dev-env:main
38+
39+
profiles:
40+
- pulp-service-contributor
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Pulp Service SDLC Pipeline
2+
3+
trigger:
4+
github:
5+
events: [issues]
6+
actions: [labeled]
7+
labels: [agentic-sdlc]
8+
repos: [pulp/pulp-service]
9+
delivery_mode: polling
10+
jira:
11+
labels: [agentic-sdlc]
12+
13+
workflow:
14+
- id: implement
15+
type: agent
16+
agent: SDLC Developer
17+
max_retries: 3
18+
inputs:
19+
branch: "issue-{{trigger.issue_number}}-fix"
20+
issue_number: "{{trigger.issue_number}}"
21+
repo: "pulp/pulp-service"
22+
issue_title: "{{trigger.issue_title}}"
23+
issue_body: "{{trigger.issue_body}}"
24+
issue_url: "{{trigger.issue_url}}"
25+
outputs: [summary]
26+
27+
- id: create-pr
28+
type: bridge
29+
action: create-pr
30+
depends: "implement.Succeeded"
31+
inputs:
32+
repo: pulp/pulp-service
33+
branch: "{{steps.implement.inputs.branch}}"
34+
title: "Fix #{{trigger.issue_number}}: {{trigger.issue_title}}"
35+
base: main
36+
draft: true
37+
body: "Closes {{trigger.issue_url}}\n\n## Summary\n\n{{steps.implement.outputs.summary}}"
38+
39+
- id: await-ci
40+
type: bridge
41+
action: await-ci
42+
depends: "create-pr.Succeeded || ci-fix.Succeeded"
43+
max_iterations: 4
44+
inputs:
45+
repo: pulp/pulp-service
46+
pr: "{{steps.create-pr.outputs.pr_number}}"
47+
48+
- id: ci-fix
49+
type: agent
50+
agent: SDLC Developer
51+
depends: "await-ci.Failed"
52+
max_iterations: 3
53+
inputs:
54+
branch: "{{steps.implement.inputs.branch}}"
55+
issue_number: "{{trigger.issue_number}}"
56+
repo: "pulp/pulp-service"
57+
issue_title: "{{trigger.issue_title}}"
58+
issue_body: "{{trigger.issue_body}}"
59+
issue_url: "{{trigger.issue_url}}"
60+
ci_logs: "{{steps.await-ci.outputs.failure_logs}}"
61+
outputs: [summary]
62+
63+
- id: code-review
64+
type: agent
65+
agent: PR Reviewer
66+
depends: "await-ci.Succeeded || revision.Succeeded"
67+
max_iterations: 3
68+
inputs:
69+
pr: "{{steps.create-pr.outputs.pr_number}}"
70+
outputs: [approved, comments]
71+
72+
- id: revision
73+
type: agent
74+
agent: SDLC Developer
75+
depends: "code-review.Failed"
76+
max_iterations: 3
77+
inputs:
78+
branch: "{{steps.implement.inputs.branch}}"
79+
issue_number: "{{trigger.issue_number}}"
80+
repo: "pulp/pulp-service"
81+
issue_title: "{{trigger.issue_title}}"
82+
issue_body: "{{trigger.issue_body}}"
83+
issue_url: "{{trigger.issue_url}}"
84+
code_feedback: "{{steps.code-review.outputs.comments}}"
85+
outputs: [summary]
86+
87+
- id: merge
88+
type: bridge
89+
action: merge-pr
90+
depends: "code-review.Succeeded"
91+
inputs:
92+
repo: pulp/pulp-service
93+
pr: "{{steps.create-pr.outputs.pr_number}}"

0 commit comments

Comments
 (0)