Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Once installed, run it from your AI agent with `/linear-release-setup` (or just
| `stage` | No | | Deployment stage such as `staging` or `production` (required for `update`) |
| `include_paths` | No | | Filter commits by file paths (comma-separated globs for monorepos) |
| `include_subjects` | No | | Filter commits whose subject (first line) matches a regular expression. Composes with `include_paths`. |
| `issue_pattern` | No | | Extract issue identifiers captured by group 1 of a regular expression from commit subjects. Additive to the built-in detection. |
| `base_ref` | No | | Override the `sync` scan base. Exclusive: scans `<base_ref>..HEAD` |
| `links` | No | | Links to attach to the targeted release, one per line. Each value must be either an absolute URL or `Label=URL`. |
| `documents` | No | | Documents to attach to the targeted release, one per line as `[Title=]path/to/file.md` (title inferred from the filename if omitted). Existing documents with the same title are updated. |
Expand Down Expand Up @@ -169,6 +170,17 @@ Use `include_subjects` to only scan commits whose subject (first line) matches a
include_subjects: "[A-Z]{2,}-[0-9]+"
```

### Custom issue patterns

Use `issue_pattern` when commit subjects reference issues in a convention the built-in detection doesn't cover. The regex is matched case-insensitively anywhere in the subject (first line), with the identifier in capture group 1. Additive to the built-in branch-name, magic-word, and subject-pattern detection.

```yaml
- uses: linear/linear-release-action@v0
with:
access_key: ${{ secrets.LINEAR_ACCESS_KEY }}
issue_pattern: '\[([A-Z]+-\d+)\]'
```

### Scan base override

Use `base_ref` to explicitly choose the exclusive lower bound for `sync`'s commit scan. This is useful when the automatically selected release baseline is not the range you want for a custom branching workflow, first-time onboarding, or migration.
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ inputs:
include_subjects:
description: Filter commits whose subject (first line) matches a regular expression (e.g., "[A-Z]{2,}-[0-9]+"). Composes with include_paths.
required: false
issue_pattern:
description: 'Extract issue identifiers captured by group 1 of a regular expression from commit subjects (e.g., "\[([A-Z]+-\d+)\]"). Additive to the built-in detection.'
required: false
base_ref:
description: "Override the sync scan base. Exclusive: scans <base_ref>..HEAD."
required: false
Expand Down Expand Up @@ -100,6 +103,7 @@ runs:
INPUT_STAGE: ${{ inputs.stage }}
INPUT_INCLUDE_PATHS: ${{ inputs.include_paths }}
INPUT_INCLUDE_SUBJECTS: ${{ inputs.include_subjects }}
INPUT_ISSUE_PATTERN: ${{ inputs.issue_pattern }}
INPUT_BASE_REF: ${{ inputs.base_ref }}
INPUT_LINKS: ${{ inputs.links }}
INPUT_DOCUMENTS: ${{ inputs.documents }}
Expand Down
1 change: 1 addition & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ args=()
[[ -n "${INPUT_STAGE:-}" ]] && args+=("--stage=${INPUT_STAGE}")
[[ -n "${INPUT_INCLUDE_PATHS:-}" ]] && args+=("--include-paths=${INPUT_INCLUDE_PATHS}")
[[ -n "${INPUT_INCLUDE_SUBJECTS:-}" ]] && args+=("--include-subjects=${INPUT_INCLUDE_SUBJECTS}")
[[ -n "${INPUT_ISSUE_PATTERN:-}" ]] && args+=("--issue-pattern=${INPUT_ISSUE_PATTERN}")
[[ -n "${INPUT_BASE_REF:-}" ]] && args+=("--base-ref=${INPUT_BASE_REF}")
if [[ -n "${INPUT_LINKS:-}" ]]; then
while IFS= read -r link || [[ -n "$link" ]]; do
Expand Down
Loading