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
36 changes: 18 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ on:
jobs:
format:
runs-on: ubuntu-latest
# Only run from pull_request_target if it's a release-please branch, otherwise skip (to avoid duplicate runs)
if: github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && startsWith(github.event.pull_request.head.ref, 'release-please--')) || github.event_name == 'workflow_dispatch'
# Run from pull_request for non-release-please branches, or pull_request_target for release-please branches only
if: (github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--')) || (github.event_name == 'pull_request_target' && startsWith(github.event.pull_request.head.ref, 'release-please--')) || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# For pull_request_target, explicitly checkout the PR head
# For pull_request_target, explicitly checkout the PR head (for security)
# For regular pull_request and workflow_dispatch, checkout action uses defaults
ref: ${{ github.event.pull_request.head.sha }}
# Only checkout PR code if it's from the same repo (safe for release-please)
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Setup Node.js
Expand All @@ -35,15 +35,15 @@ jobs:

lint:
runs-on: ubuntu-latest
# Only run from pull_request_target if it's a release-please branch, otherwise skip (to avoid duplicate runs)
if: github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && startsWith(github.event.pull_request.head.ref, 'release-please--')) || github.event_name == 'workflow_dispatch'
# Run from pull_request for non-release-please branches, or pull_request_target for release-please branches only
if: (github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--')) || (github.event_name == 'pull_request_target' && startsWith(github.event.pull_request.head.ref, 'release-please--')) || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# For pull_request_target, explicitly checkout the PR head
# For pull_request_target, explicitly checkout the PR head (for security)
# For regular pull_request and workflow_dispatch, checkout action uses defaults
ref: ${{ github.event.pull_request.head.sha }}
# Only checkout PR code if it's from the same repo (safe for release-please)
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Setup Node.js
Expand All @@ -60,15 +60,15 @@ jobs:

build:
runs-on: ubuntu-latest
# Only run from pull_request_target if it's a release-please branch, otherwise skip (to avoid duplicate runs)
if: github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && startsWith(github.event.pull_request.head.ref, 'release-please--')) || github.event_name == 'workflow_dispatch'
# Run from pull_request for non-release-please branches, or pull_request_target for release-please branches only
if: (github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--')) || (github.event_name == 'pull_request_target' && startsWith(github.event.pull_request.head.ref, 'release-please--')) || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# For pull_request_target, explicitly checkout the PR head
# For pull_request_target, explicitly checkout the PR head (for security)
# For regular pull_request and workflow_dispatch, checkout action uses defaults
ref: ${{ github.event.pull_request.head.sha }}
# Only checkout PR code if it's from the same repo (safe for release-please)
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Setup Node.js
Expand All @@ -86,15 +86,15 @@ jobs:
test:
runs-on: ubuntu-latest
needs: build
# Only run from pull_request_target if it's a release-please branch, otherwise skip (to avoid duplicate runs)
if: github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && startsWith(github.event.pull_request.head.ref, 'release-please--')) || github.event_name == 'workflow_dispatch'
# Run from pull_request for non-release-please branches, or pull_request_target for release-please branches only
if: (github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--')) || (github.event_name == 'pull_request_target' && startsWith(github.event.pull_request.head.ref, 'release-please--')) || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# For pull_request_target, explicitly checkout the PR head
# For pull_request_target, explicitly checkout the PR head (for security)
# For regular pull_request and workflow_dispatch, checkout action uses defaults
ref: ${{ github.event.pull_request.head.sha }}
# Only checkout PR code if it's from the same repo (safe for release-please)
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Setup Node.js
Expand All @@ -120,8 +120,8 @@ jobs:
ready-to-merge:
runs-on: ubuntu-latest
needs: [format, lint, build, test]
# Only run from pull_request_target if it's a release-please branch, otherwise skip (to avoid duplicate runs)
if: always() && (github.event_name == 'pull_request' || (github.event_name == 'pull_request_target' && startsWith(github.event.pull_request.head.ref, 'release-please--')) || github.event_name == 'workflow_dispatch')
# Run from pull_request for non-release-please branches, or pull_request_target for release-please branches only
if: always() && ((github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--')) || (github.event_name == 'pull_request_target' && startsWith(github.event.pull_request.head.ref, 'release-please--')) || github.event_name == 'workflow_dispatch')
steps:
- name: Check all jobs passed
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,18 @@ jobs:
mcp
devbox
blueprint
main
snapshot
config
auth
ui
deps
# Ensure the subject starts with a lowercase letter
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
should start with a lowercase letter.

Examples:
- feat: add new devbox command
- fix(cli): resolve argument parsing issue
- docs: update README with usage examples

Loading