From d1dc3b3ddd61e53de1fa502241d18d96351f773f Mon Sep 17 00:00:00 2001 From: Romain Cascino Date: Fri, 7 Aug 2026 10:59:03 +0200 Subject: [PATCH 1/2] Expose issue_pattern input mapping to CLI --issue-pattern --- README.md | 12 ++++++++++++ action.yml | 4 ++++ run.sh | 1 + 3 files changed, 17 insertions(+) diff --git a/README.md b/README.md index 95c1f07..60397ba 100644 --- a/README.md +++ b/README.md @@ -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 from commit subjects using a custom regular expression with the identifier in capture group 1. Additive to the built-in detection. | | `base_ref` | No | | Override the `sync` scan base. Exclusive: scans `..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. | @@ -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` to extract issue identifiers from a custom commit-subject convention. Capture the identifier in group 1; the regex is applied to the subject only, case-insensitively, and anywhere in the subject, with all matches collected. It is 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. diff --git a/action.yml b/action.yml index dfcab3a..e9e0f03 100644 --- a/action.yml +++ b/action.yml @@ -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 from commit subjects using a custom regular expression with the identifier in capture group 1 (e.g. "\[([A-Z]+-\d+)\]"). Additive to the built-in detection.' + required: false base_ref: description: "Override the sync scan base. Exclusive: scans ..HEAD." required: false @@ -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 }} diff --git a/run.sh b/run.sh index 9c39b0f..4fd70cf 100644 --- a/run.sh +++ b/run.sh @@ -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 From 48351c2b3c1afc3bbd51b5d3fcce36f2800add31 Mon Sep 17 00:00:00 2001 From: Romain Cascino Date: Fri, 7 Aug 2026 12:15:24 +0200 Subject: [PATCH 2/2] Tighten issue_pattern wording to match README tone --- README.md | 4 ++-- action.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 60397ba..0b2b74d 100644 --- a/README.md +++ b/README.md @@ -63,7 +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 from commit subjects using a custom regular expression with the identifier in capture group 1. Additive to the built-in detection. | +| `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 `..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. | @@ -172,7 +172,7 @@ Use `include_subjects` to only scan commits whose subject (first line) matches a ### Custom issue patterns -Use `issue_pattern` to extract issue identifiers from a custom commit-subject convention. Capture the identifier in group 1; the regex is applied to the subject only, case-insensitively, and anywhere in the subject, with all matches collected. It is additive to the built-in branch-name, magic-word, and subject-pattern detection. +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 diff --git a/action.yml b/action.yml index e9e0f03..42ba9d4 100644 --- a/action.yml +++ b/action.yml @@ -33,7 +33,7 @@ inputs: 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 from commit subjects using a custom regular expression with the identifier in capture group 1 (e.g. "\[([A-Z]+-\d+)\]"). Additive to the built-in detection.' + 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 ..HEAD."