Skip to content

feat(cli): add --target to feedback add #12234

feat(cli): add --target to feedback add

feat(cli): add --target to feedback add #12234

name: Lint Pull Request

Check warning on line 1 in .github/workflows/lint-pull-request.yml

View workflow run for this annotation

GitHub Actions / Lint Pull Request

Workflow execution policy warning (evaluate mode)

On December 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
# Release-notes PRs (head ref `release-notes/*`) skip CI; only
# apply-release-notes.yml runs for those.
#
# Draft PRs skip this check unless they carry `run-ci` (same opt-in as Test).
# Label events retrigger this cheap check so adding `run-ci` on a draft starts
# lint without waiting for a push.
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened
- ready_for_review
- labeled
- unlabeled
merge_group:
types:
- checks_requested
branches:
- develop
- next
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
main:
if: |
github.event_name == 'merge_group' ||
(github.event_name == 'pull_request_target' &&
!startsWith(github.event.pull_request.head.ref, 'release-notes/') &&
(github.event.pull_request.draft == false ||
contains(github.event.pull_request.labels.*.name, 'run-ci')))
name: Lint Pull Request
runs-on: ubuntu-latest
steps:
- if: github.event_name == 'pull_request_target'
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Keep this scope list in sync with commitlint.config.js.
with:
scopes: |
api
cli
cli-e2e
cli-go
cli-test-helpers
config
docs
process-compose
stack
ci
deps
repo
misc
release
- if: github.event_name == 'merge_group'
run: echo "Merge queue entry does not have a pull request payload; reporting success for the required lint check."
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: |
.github/scripts
apps/cli/scripts/analyze-commits-title.js
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version-file: .bun-version
- name: Breaking titles target next
env:
TITLE: ${{ github.event_name == 'merge_group' && github.event.merge_group.head_commit.message || github.event.pull_request.title }}
BASE_REF: ${{ github.event_name == 'merge_group' && github.event.merge_group.base_ref || github.event.pull_request.base.ref }}
HEAD_REF: ${{ github.event.pull_request.head.ref }}
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
BASE_REPO: ${{ github.repository }}
run: |
if [ -f .github/scripts/pr-title-guard.ts ]; then
bun .github/scripts/pr-title-guard.ts
else
echo "::notice::pr-title-guard.ts is not on the default branch yet; skipping"
fi