-
Notifications
You must be signed in to change notification settings - Fork 0
Add skill to generate configuration #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
RomainCscn
merged 2 commits into
main
from
romain/lin-60645-add-skillmd-to-generate-linear-cli-config-from-linear
Feb 24, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Linear Release — CircleCI (Continuous Pipeline) | ||
| # | ||
| # Use when: Every deployment creates a completed release automatically. | ||
| # Trigger: On every push to main. | ||
| # Customize: Branch name, path filters (--include-paths). | ||
| # Note: Set LINEAR_ACCESS_KEY in CircleCI project settings. | ||
|
|
||
| version: 2.1 | ||
|
|
||
| jobs: | ||
| linear-release-sync: | ||
| docker: | ||
| - image: cimg/base:current | ||
| steps: | ||
| - checkout | ||
| - run: | ||
| name: Download Linear Release | ||
| command: | | ||
| curl -sL https://github.com/linear/linear-release/releases/latest/download/linear-release-linux-x64 -o linear-release | ||
| chmod +x linear-release | ||
| - run: | ||
| name: Sync release | ||
| command: ./linear-release sync | ||
|
|
||
| workflows: | ||
| release: | ||
| jobs: | ||
| - linear-release-sync: | ||
| filters: | ||
| branches: | ||
| only: main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| # Linear Release — CircleCI (Scheduled) | ||
| # | ||
| # Use when: Releases follow a branch cut model. Main syncs without a version, | ||
| # release branches derive version from CIRCLE_BRANCH. | ||
| # | ||
| # Trigger: Auto on push, API trigger for later stage transitions and completion. | ||
| # Customize: Branch patterns, stage names, auto-promotion stage. | ||
| # Note: Set LINEAR_ACCESS_KEY and CIRCLE_TOKEN in CircleCI project settings. | ||
| # | ||
| # Branch creation detection: CircleCI has no built-in signal, so auto-promotion | ||
| # checks the API for previous pipelines on the branch. | ||
| # | ||
| # Monorepo: CircleCI doesn't support path filtering natively. Use the `path-filtering` | ||
| # orb or split into separate workflows and use the API to conditionally trigger. | ||
|
|
||
| version: 2.1 | ||
|
|
||
| # Pipeline parameters — passed via CircleCI API for manual stage transitions. | ||
| # On normal pushes, defaults apply and only the sync workflows run. | ||
| parameters: | ||
| run-release-action: | ||
| type: boolean | ||
| default: false | ||
| action: | ||
| type: enum | ||
| enum: ["update", "complete"] | ||
| default: "update" | ||
| stage: | ||
| type: string | ||
| default: "" | ||
| release_version: | ||
| type: string | ||
| default: "" | ||
|
|
||
| jobs: | ||
| linear-release-sync-main: | ||
| docker: | ||
| - image: cimg/base:current | ||
| steps: | ||
| - checkout | ||
| - run: | ||
| name: Download Linear Release | ||
| command: | | ||
| curl -sL https://github.com/linear/linear-release/releases/latest/download/linear-release-linux-x64 -o linear-release | ||
| chmod +x linear-release | ||
| - run: | ||
| name: Sync release | ||
| command: ./linear-release sync | ||
|
|
||
| linear-release-sync-release: | ||
| docker: | ||
| - image: cimg/base:current | ||
| steps: | ||
| - checkout | ||
| - run: | ||
| name: Download Linear Release | ||
| command: | | ||
| curl -sL https://github.com/linear/linear-release/releases/latest/download/linear-release-linux-x64 -o linear-release | ||
| chmod +x linear-release | ||
| - run: | ||
| name: Derive version and sync | ||
| command: | | ||
| RELEASE_VERSION="${CIRCLE_BRANCH#release/}" | ||
| ./linear-release sync --release-version="$RELEASE_VERSION" | ||
| - run: | ||
| name: Auto-promote on branch creation | ||
| command: | | ||
| RELEASE_VERSION="${CIRCLE_BRANCH#release/}" | ||
| # Check if this is the first pipeline on this branch (branch creation) | ||
| PIPELINE_COUNT=$(curl -s -H "Circle-Token: $CIRCLE_TOKEN" \ | ||
| "https://circleci.com/api/v2/project/gh/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline?branch=$CIRCLE_BRANCH" \ | ||
| | jq '.items | length') | ||
| if [ "$PIPELINE_COUNT" -le 1 ]; then | ||
| ./linear-release update --release-version="$RELEASE_VERSION" --stage="code freeze" | ||
| fi | ||
|
|
||
| linear-release-action: | ||
| docker: | ||
| - image: cimg/base:current | ||
| steps: | ||
| - checkout | ||
| - run: | ||
| name: Download Linear Release | ||
| command: | | ||
| curl -sL https://github.com/linear/linear-release/releases/latest/download/linear-release-linux-x64 -o linear-release | ||
| chmod +x linear-release | ||
| - run: | ||
| name: Run release action | ||
| command: | | ||
| case "<< pipeline.parameters.action >>" in | ||
| update) | ||
| ./linear-release update \ | ||
| --release-version="<< pipeline.parameters.release_version >>" \ | ||
| --stage="<< pipeline.parameters.stage >>" | ||
| ;; | ||
| complete) | ||
| ./linear-release complete \ | ||
| --release-version="<< pipeline.parameters.release_version >>" | ||
| ;; | ||
| esac | ||
|
|
||
| workflows: | ||
| # On normal pushes — sync issues to the release | ||
| release-sync-main: | ||
| when: | ||
| not: << pipeline.parameters.run-release-action >> | ||
| jobs: | ||
| - linear-release-sync-main: | ||
| filters: | ||
| branches: | ||
| only: main | ||
|
|
||
| release-sync-release: | ||
| when: | ||
| not: << pipeline.parameters.run-release-action >> | ||
| jobs: | ||
| - linear-release-sync-release: | ||
| filters: | ||
| branches: | ||
| only: /^release\/.*/ | ||
|
|
||
| # Trigger via CircleCI API: | ||
| # curl -X POST https://circleci.com/api/v2/project/gh/ORG/REPO/pipeline \ | ||
| # -H "Circle-Token: $CIRCLE_TOKEN" -H "Content-Type: application/json" \ | ||
| # -d '{"parameters": {"run-release-action": true, "action": "update", "stage": "qa", "release_version": "1.2.0"}}' | ||
| release-action: | ||
| when: << pipeline.parameters.run-release-action >> | ||
| jobs: | ||
| - linear-release-action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Linear Release — GitHub Actions (Continuous Pipeline) | ||
| # | ||
| # Use when: Every deployment creates a completed release automatically. | ||
| # Trigger: On every push to main. | ||
| # Customize: Branch name, path filters (include_paths input). | ||
|
|
||
| name: Linear Release | ||
| on: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| linear-release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: linear/linear-release-action@v0 | ||
| with: | ||
| access_key: ${{ secrets.LINEAR_ACCESS_KEY }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| # Linear Release — GitHub Actions (Scheduled) | ||
| # | ||
| # Use when: Releases follow a branch cut model. Main collects changes into the | ||
| # current release, a release branch is cut for stabilization, and branch creation | ||
| # auto-promotes to "code freeze". | ||
| # | ||
| # Trigger: push to main (sync), push to release/* (sync + auto code freeze on | ||
| # creation), or manual workflow_dispatch for later stages and completion. | ||
| # Customize: Branch patterns, stage names, version derivation. | ||
| # | ||
| # Monorepo: GitHub Actions `paths` applies to all branches in a push trigger. | ||
| # To path-filter main without filtering release branches, split into two files: | ||
| # File 1 (main): add `paths: [...]` to the push trigger, keep only the main sync step. | ||
| # File 2 (release): keep the release branch + workflow_dispatch logic as-is. | ||
| # Add `include_paths` to the action in both files. | ||
|
|
||
| name: Linear Release | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - "release/**" | ||
| workflow_dispatch: | ||
| inputs: | ||
| action: | ||
| description: "Release action" | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - update | ||
| - complete | ||
| stage: | ||
| description: "Release stage (for update, e.g. qa)" | ||
| required: false | ||
| type: string | ||
| release_version: | ||
| description: "Release version" | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| linear-release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| # Main branch: sync without --release-version (targets current started release) | ||
| - uses: linear/linear-release-action@v0 | ||
| if: github.event_name == 'push' && !startsWith(github.ref_name, 'release/') | ||
| with: | ||
| access_key: ${{ secrets.LINEAR_ACCESS_KEY }} | ||
|
|
||
| # Release branch: derive version from branch name | ||
| - name: Set release version | ||
| if: github.event_name == 'push' && startsWith(github.ref_name, 'release/') | ||
| run: echo "RELEASE_VERSION=${GITHUB_REF_NAME#release/}" >> "$GITHUB_ENV" | ||
|
|
||
| # Release branch: sync with explicit version | ||
| - uses: linear/linear-release-action@v0 | ||
| if: github.event_name == 'push' && startsWith(github.ref_name, 'release/') | ||
| with: | ||
| access_key: ${{ secrets.LINEAR_ACCESS_KEY }} | ||
| release_version: ${{ env.RELEASE_VERSION }} | ||
|
|
||
| # Branch creation: auto-promote to code freeze | ||
| - uses: linear/linear-release-action@v0 | ||
| if: github.event_name == 'push' && startsWith(github.ref_name, 'release/') && github.event.created | ||
| with: | ||
| access_key: ${{ secrets.LINEAR_ACCESS_KEY }} | ||
| action: update | ||
| stage: code freeze | ||
| release_version: ${{ env.RELEASE_VERSION }} | ||
|
|
||
| # Manual: run the specified action (later stages, completion) | ||
| - uses: linear/linear-release-action@v0 | ||
| if: github.event_name == 'workflow_dispatch' | ||
| with: | ||
| access_key: ${{ secrets.LINEAR_ACCESS_KEY }} | ||
| action: ${{ inputs.action }} | ||
| stage: ${{ inputs.stage }} | ||
| release_version: ${{ inputs.release_version }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Linear Release — GitLab CI (Continuous Pipeline) | ||
| # | ||
| # Use when: Every deployment creates a completed release automatically. | ||
| # Trigger: On every push to the default branch. | ||
| # Customize: Branch rules, path filters (--include-paths). | ||
|
|
||
| .linear-release-setup: &linear-release-setup | ||
| before_script: | ||
| - curl -sL https://github.com/linear/linear-release/releases/latest/download/linear-release-linux-x64 -o linear-release | ||
| - chmod +x linear-release | ||
|
|
||
| linear-release-sync: | ||
| <<: *linear-release-setup | ||
| stage: deploy | ||
| script: | ||
| - ./linear-release sync | ||
| variables: | ||
| LINEAR_ACCESS_KEY: $LINEAR_ACCESS_KEY | ||
| GIT_DEPTH: 0 | ||
| rules: | ||
| - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Linear Release — GitLab CI (Scheduled) | ||
| # | ||
| # Use when: Releases follow a branch cut model. Main syncs without a version, | ||
| # release branches derive version from branch name. Branch creation auto-promotes | ||
| # to "code freeze" (detected via CI_COMMIT_BEFORE_SHA being all zeros). | ||
| # | ||
| # Trigger: Auto on push, manual for later stage transitions and completion. | ||
| # Customize: Branch patterns, stage names, version derivation. | ||
| # | ||
| # Monorepo: Add `changes` filter to the main job's rules only (not release branch jobs): | ||
| # rules: | ||
| # - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | ||
| # changes: | ||
| # - "apps/mobile/**" | ||
| # - "packages/shared/**" | ||
| # Also add --include-paths to all sync commands. | ||
|
|
||
| .linear-release-setup: &linear-release-setup | ||
| before_script: | ||
| - curl -sL https://github.com/linear/linear-release/releases/latest/download/linear-release-linux-x64 -o linear-release | ||
| - chmod +x linear-release | ||
|
|
||
| # Main branch: sync without --release-version (targets current started release) | ||
| linear-release-sync-main: | ||
| <<: *linear-release-setup | ||
| stage: deploy | ||
| script: | ||
| - ./linear-release sync | ||
| variables: | ||
| LINEAR_ACCESS_KEY: $LINEAR_ACCESS_KEY | ||
| GIT_DEPTH: 0 | ||
| rules: | ||
| - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | ||
|
|
||
| # Release branch: derive version from branch name and sync | ||
| linear-release-sync-release: | ||
| <<: *linear-release-setup | ||
| stage: deploy | ||
| script: | ||
| - export RELEASE_VERSION="${CI_COMMIT_BRANCH#release/}" | ||
| - ./linear-release sync --release-version="$RELEASE_VERSION" | ||
| # Auto-promote on branch creation (first push to a new branch) | ||
| - | | ||
| if [ "$CI_COMMIT_BEFORE_SHA" = "0000000000000000000000000000000000000000" ]; then | ||
| ./linear-release update --release-version="$RELEASE_VERSION" --stage="code freeze" | ||
| fi | ||
| variables: | ||
| LINEAR_ACCESS_KEY: $LINEAR_ACCESS_KEY | ||
| GIT_DEPTH: 0 | ||
| rules: | ||
| - if: $CI_COMMIT_BRANCH =~ /^release\// | ||
|
|
||
| # Trigger manually for later stage transitions and completion | ||
| linear-release-update: | ||
| <<: *linear-release-setup | ||
| stage: deploy | ||
| script: | ||
| - export RELEASE_VERSION="${CI_COMMIT_BRANCH#release/}" | ||
| - ./linear-release update --release-version="$RELEASE_VERSION" --stage="$STAGE" | ||
| variables: | ||
| LINEAR_ACCESS_KEY: $LINEAR_ACCESS_KEY | ||
| STAGE: "" | ||
| GIT_DEPTH: 0 | ||
| rules: | ||
| - if: $CI_COMMIT_BRANCH =~ /^release\// | ||
| when: manual | ||
|
|
||
| linear-release-complete: | ||
| <<: *linear-release-setup | ||
| stage: deploy | ||
| script: | ||
| - export RELEASE_VERSION="${CI_COMMIT_BRANCH#release/}" | ||
| - ./linear-release complete --release-version="$RELEASE_VERSION" | ||
| variables: | ||
| LINEAR_ACCESS_KEY: $LINEAR_ACCESS_KEY | ||
| GIT_DEPTH: 0 | ||
| rules: | ||
| - if: $CI_COMMIT_BRANCH =~ /^release\// | ||
| when: manual |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This format probably works with skills.sh /
npx skills add linear/linear-releasewhich seems to have a bit of ecosystem momentum if you wanted to advertise an easy command to wire it upThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll look into adding it.