aRustyDev / aRustyDev/gh

feat(action): atomic-branch/create-pr - Create/update PR with attestation

Open
#29 2 comments 0 reactions 1 assignee Claimed by @aRustyDev View on GitHub
enhancement new-action
Dominant language
Shell
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Parent Epic
Part of #22 (Atomic Release Pipeline Actions)

## Priority
P1 - Core W2 functionality

## Description

Create a composite action that creates or updates a PR with attestation lineage.

For each artifact branch, creates a PR to the target branch that carries forward the attestation chain from the source PR.

## Inputs

| Input | Required | Default | Description |
|-------|----------|---------|-------------|
| `artifact` | Yes | - | Artifact name |
| `branch` | Yes | - | Source branch for PR |
| `target-branch` | No | `main` | Target branch for PR |
| `source-pr` | No | - | Source PR number (for lineage) |
| `attestation-map` | No | `{}` | Attestation map to carry forward |
| `source-branch` | No | `integration` | Original source branch name |
| `token` | No | `github.token` | GitHub token |

## Outputs

| Output | Description |
|--------|-------------|
| `pr-number` | PR number (new or existing) |
| `pr-action` | Action taken: "created", "updated", or "unchanged" |
| `pr-url` | Full PR URL |

## Usage Example

```yaml
- uses: arustydev/gha/actions/atomic-branch/create-pr@v1
id: pr
with:
artifact: my-chart
branch: charts/my-chart
target-branch: main
source-pr: 123
attestation-map: '{"lint": "att-123"}'

- run: echo "PR: ${{ steps.pr.outputs.pr-url }}"
```

## Source Reference

`gha/.github/workflows/atomic-release-atomize-changes.yml`:
- Create/update PR step (lines 315-402)

## Implementation Notes

- Check for existing PR before creating
- Include attestation map in PR body
- Handle race conditions gracefully
- Use conventional commit format for PR title

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.