Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
653de28
docs(framework): update README title and tagline
alexsoyes Jul 19, 2026
5ed7480
chore: release main (#453)
aidd-bot[bot] Jul 19, 2026
7661980
refactor(aidd-context): action citations use markdown links, not @
blafourcade Jul 16, 2026
cfaf61b
docs(framework): reposition readme as agnostic token-optimized framew…
alexsoyes Jul 18, 2026
8062400
refactor(aidd-context): restructure 10-learn into a 5-action router (…
blafourcade Jul 20, 2026
268d5ab
ci(deps): bump github/codeql-action/analyze from 4.37.0 to 4.37.1 (#456)
dependabot[bot] Jul 20, 2026
bdd12c6
ci(deps): bump github/codeql-action/autobuild from 4.37.0 to 4.37.1 (…
dependabot[bot] Jul 20, 2026
daeef56
fix(cli): migrate aidd-cli into framework as cli/, full history prese…
blafourcade Jul 22, 2026
601c30c
fix(cli): repoint self-references from aidd-cli to framework
blafourcade Jul 22, 2026
691c1c3
fix(cli): add license and keywords for the npm package page
blafourcade Jul 22, 2026
be7195b
chore: release main (#485)
aidd-bot[bot] Jul 22, 2026
047bcb2
fix(cli): restore correct version after release-please regression (#488)
blafourcade Jul 22, 2026
c84fc3d
chore: release main (#489)
aidd-bot[bot] Jul 22, 2026
22171ed
fix(cli): restore correct version again after second regression, re-a…
blafourcade Jul 22, 2026
ca4fddc
chore: release main (#494)
aidd-bot[bot] Jul 22, 2026
ec50488
fix(release-please): exclude manifest file from root path tracking (#…
blafourcade Jul 22, 2026
79bd842
chore: release main (#498)
aidd-bot[bot] Jul 22, 2026
c6103e6
fix(docs): resolve real broken markdown links, drop temporary link-ch…
blafourcade Jul 22, 2026
1c41e02
chore: release main (#501)
aidd-bot[bot] Jul 22, 2026
be83f25
ci(deps-dev): bump js-yaml from 5.2.1 to 5.2.2 (#545)
dependabot[bot] Jul 28, 2026
98b3045
fix(cli): scope plugin restore to --tool, collapse double materializa…
blafourcade Jul 24, 2026
2e3ebaa
fix(cli): document intentional force on internal build-cache rebuild …
blafourcade Jul 24, 2026
e39d4ec
refactor(cli): inject shared StatusUseCase/RestoreUseCase/UpdateOneTo…
blafourcade Jul 24, 2026
3b266b5
fix(cli): resolve buildClaudeStyleMarketplaceEntry and PluginTranslat…
blafourcade Jul 24, 2026
824220e
refactor(aidd-refine): 01-brainstorm moves from fixed probing loop to…
blafourcade Jul 24, 2026
4bf4c12
ci(deps): bump github/codeql-action/init from 4.37.0 to 4.37.3 (#476)
dependabot[bot] Jul 24, 2026
ad8e530
ci(deps): bump actions/checkout from 7.0.0 to 7.0.1 (#458)
dependabot[bot] Jul 24, 2026
a17ce7c
ci(deps): bump actions/setup-node from 6.4.0 to 7.0.0 (#459)
dependabot[bot] Jul 24, 2026
d822a99
chore(deps-dev): bump @types/node from 24.10.15 to 26.1.1 in /cli (#480)
dependabot[bot] Jul 24, 2026
2b31132
chore(deps-dev): bump @commitlint/cli from 19.8.1 to 21.2.1 in /cli (…
dependabot[bot] Jul 24, 2026
32fa8e1
chore(deps): bump commander from 12.1.0 to 15.0.0 in /cli (#479)
dependabot[bot] Jul 24, 2026
1aa97f6
chore(deps-dev): bump typescript from 5.9.3 to 7.0.2 in /cli (#484)
dependabot[bot] Jul 24, 2026
321a898
fix(cli): derive framework build's SUPPORTED_TARGETS from the build r…
blafourcade Jul 24, 2026
791879c
test(cli): add AiTool registry conformance suite (#516)
blafourcade Jul 27, 2026
9478440
refactor(cli): inject PostInstallPipelineUseCase and GitignoreUseCase…
blafourcade Jul 27, 2026
91241c5
fix(cli): surface menu errors instead of swallowing them into an infi…
blafourcade Jul 27, 2026
0ce27a6
fix(ci): promote.yml recognizes squash-merged back-merges as sync bou…
blafourcade Jul 27, 2026
ccf6d3c
fix(cli): drop the auth gate from self-update (#525)
blafourcade Jul 27, 2026
63e604c
test(cli): drop ticket and point-in-time references from test comment…
blafourcade Jul 27, 2026
b2ea565
fix(cli): move marketplace refresh --force cache clear into its use-c…
blafourcade Jul 27, 2026
a9c55c5
fix(cli): ide uninstall removes the settings keys it merged in (#529)
blafourcade Jul 27, 2026
ba80b38
fix(cli): report each status/doctor scope once, under an accurate lab…
blafourcade Jul 27, 2026
71a31a6
test(cli): pin the report-and-continue policy in UpdateOneToolUseCase…
blafourcade Jul 27, 2026
b872b1c
chore(deps-dev): bump @types/node from 26.1.1 to 26.1.2 in /cli (#534)
dependabot[bot] Jul 27, 2026
9b575fe
chore(deps-dev): bump knip from 6.27.0 to 6.29.0 in /cli (#536)
dependabot[bot] Jul 27, 2026
a5a1cf4
chore(deps-dev): bump jscpd from 5.0.12 to 5.0.14 in /cli (#537)
dependabot[bot] Jul 27, 2026
06275a2
chore(deps): bump smol-toml from 1.6.1 to 1.7.1 in /cli (#538)
dependabot[bot] Jul 27, 2026
9bd9724
refactor(cli): detect plugin drift through one implementation (#532)
blafourcade Jul 28, 2026
debab01
fix(cli): repair the broken pnpm lockfile (#542)
blafourcade Jul 28, 2026
16e5bfa
feat(aidd-pm): add evidence-bounded spike skill (#543)
blafourcade Jul 28, 2026
df65857
fix: framework headline (#520)
alexsoyes Jul 28, 2026
a8c1081
refactor(cli): resolve the plugin base dir in one place (#544)
blafourcade Jul 28, 2026
e3d74f3
test(cli): cover the built-tree update path before refactoring it (#541)
blafourcade Jul 28, 2026
4edeca9
refactor(cli): share the plugin translator pipeline (#546)
blafourcade Jul 28, 2026
2255a09
refactor(cli): resolve plugin catalogs through one path (#547)
blafourcade Jul 29, 2026
0788910
refactor(cli): resolve marketplaces through one path (#549)
blafourcade Jul 29, 2026
670fe44
test(cli): cover install and restore before generalizing them (#550)
blafourcade Jul 29, 2026
d5e7224
feat(aidd-pm): add Product Brief discovery skill (#551)
blafourcade Jul 29, 2026
b4826e3
refactor(cli): install content sections through one engine (#552)
blafourcade Jul 29, 2026
4244090
refactor(cli): update ai and ide tools through one implementation (#553)
blafourcade Jul 29, 2026
3965985
refactor(cli): decide restores in one place (#554)
blafourcade Jul 29, 2026
fe19bc3
fix(cli): report restore outcomes it previously hid (#555)
blafourcade Jul 29, 2026
9523142
fix(cli): stop update and restore materializing marketplace plugins (…
blafourcade Jul 29, 2026
336e874
fix(cli): remove the build force option that never did anything (#557)
blafourcade Jul 29, 2026
3739fa8
docs: fix marketplace install steps and note host-wide duplicate comm…
davidmohamedfr Jul 30, 2026
9205af1
docs(framework): simplify contribution to one issue-first path (#562)
blafourcade Jul 31, 2026
a42cdf1
chore(deps-dev): bump lefthook from 1.13.6 to 2.1.10 in /cli (#535)
dependabot[bot] Jul 31, 2026
9db5c0b
chore(deps-dev): bump @commitlint/config-conventional from 19.8.1 to …
dependabot[bot] Jul 31, 2026
e9a67c9
docs(framework): fix ROADMAP.md link, dedupe RELEASE.md, drop UPGRADE…
blafourcade Jul 31, 2026
87a39ec
chore(deps): bump @inquirer/prompts from 7.10.1 to 8.5.2 in /cli (#540)
dependabot[bot] Jul 31, 2026
13fc6f0
ci(deps): bump github/codeql-action/autobuild from 4.37.1 to 4.37.3 (…
dependabot[bot] Jul 22, 2026
5299a9c
ci(deps): bump github/codeql-action/analyze from 4.37.1 to 4.37.3 (#475)
dependabot[bot] Jul 22, 2026
5221b96
ci(framework): reconcile knip/lefthook drift from an excluded sync co…
blafourcade Jul 31, 2026
20e46f3
chore: release main (#566)
aidd-bot[bot] Jul 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/claude-code-marketplace.json",
"name": "aidd-framework",
"version": "5.5.0",
"version": "5.6.0",
"description": "Official plugin marketplace for the AI-Driven Development framework",
"owner": {
"name": "AI-Driven Dev"
Expand Down Expand Up @@ -31,7 +31,7 @@
{
"name": "aidd-pm",
"source": "./plugins/aidd-pm",
"description": "Product management: ticket-info, user-stories, prd, spec",
"description": "Product management: ticket-info, user-stories, product-brief, prd, spec, spike",
"strict": true,
"recommended": true
},
Expand Down
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Default reviewers for every change in this repository.
# GitHub assigns these reviewers automatically when a pull request is opened.
# Only Habilité AIDD maintainers can approve and merge - see GOVERNANCE.md.
# Only AIDD Maintainers can approve and merge - see GOVERNANCE.md.
# See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
* @ai-driven-dev/habilitated
* @ai-driven-dev/trusted-partners
6 changes: 0 additions & 6 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,3 @@ contact_links:
- name: Discord community
url: https://discord.gg/EWySJSpjWs
about: Ask questions, get help, or chat with the AI-Driven Dev community in real time.
- name: Website
url: https://www.ai-driven-dev.fr/
about: Read the AI-Driven Dev methodology, guides, and announcements.
- name: Report a security vulnerability
url: https://github.com/ai-driven-dev/framework/security/advisories/new
about: Disclose a vulnerability privately via GitHub Security Advisories. Do not open a public issue.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: 🗺️ Roadmap item
description: "Maintainer-authored work: a skill, a refactor, a rule to enforce"
name: 📋 Detailed Contribution
description: "Propose a scoped change: a skill, a refactor, a rule to enforce"
title: "<type>(<scope>): "
type: Task
body:
- type: markdown
attributes:
value: |
For maintainers planning framework work. Reporting a bug or asking for a feature as a user?
Use the **Bug Report** or **Feature Request** form instead.
Issue-first: a maintainer validates this before any PR is opened (see [CONTRIBUTING.md](https://github.com/ai-driven-dev/framework/blob/main/CONTRIBUTING.md)).
Reporting a bug? Use the **Bug Report** form instead.

The title carries its own scope, matching `commitlint.config.cjs`: `feat(aidd-pm):`, `fix(framework):`, `refactor(aidd-context):`.
- type: textarea
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: ✨ Feature Request
description: Propose new content or an improvement to the framework
name: 🌱 Quick Contribution
description: Propose a change or new content for the framework, minimal form
title: "feat(<scope>): "
type: Feature
body:
- type: markdown
attributes:
value: |
Have an idea? You can also post and upvote it in
[Discussions](https://github.com/ai-driven-dev/framework/discussions) -
popular ideas get promoted to a roadmap vote (see [ROADMAP.md](https://github.com/ai-driven-dev/framework/blob/main/ROADMAP.md)).
Issue-first: a maintainer validates this before any PR is opened (see [CONTRIBUTING.md](https://github.com/ai-driven-dev/framework/blob/main/CONTRIBUTING.md)).
Want to discuss an idea first? Post it in [Discussions](https://github.com/ai-driven-dev/framework/discussions).
- type: textarea
id: problem
attributes:
Expand Down
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,16 @@ updates:
include: "scope"
labels:
- "dependencies"

- package-ecosystem: "npm"
directory: "cli"
target-branch: "next"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 5
commit-message:
prefix: "chore"
include: "scope"
labels:
- "dependencies"
6 changes: 5 additions & 1 deletion .github/workflows/back-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
app-id: ${{ secrets.AIDD_BOT_APP_ID }}
private-key: ${{ secrets.AIDD_BOT_PRIVATE_KEY }}

- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: next
fetch-depth: 0
Expand Down Expand Up @@ -58,6 +58,10 @@ jobs:
BRANCH="back-merge/main-to-next-${{ github.run_id }}"
git checkout -b "$BRANCH" origin/main
git push origin "$BRANCH"
# promote.yml matches this exact title prefix to recognize a
# squash-merged conflict resolution as a sync boundary (this repo
# disallows merge-commit PRs, so this can't land as a real merge
# commit). Keep both in sync if you change it.
gh pr create --base next --head "$BRANCH" \
--title "chore: back-merge main into next (conflicts)" \
--body "Automated back-merge hit conflicts (CHANGELOG / manifest / version files). Resolve manually, then merge into next." \
Expand Down
55 changes: 50 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ concurrency:
permissions:
contents: write
pull-requests: write
packages: write
id-token: write

jobs:
commitlint:
Expand All @@ -22,7 +24,7 @@ jobs:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1
Expand Down Expand Up @@ -110,7 +112,7 @@ jobs:
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Build clean marketplace bundle
# A self-contained marketplace a user can extract and register with
Expand Down Expand Up @@ -157,9 +159,9 @@ jobs:
- { tool: codex, mode: flat, flag: "--flat" }
- { tool: opencode, mode: flat, flag: "--flat" }
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"

Expand Down Expand Up @@ -209,7 +211,7 @@ jobs:
echo "released=false" >> $GITHUB_OUTPUT
fi

- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
if: steps.check.outputs.released == 'true'

- name: Get plugin version
Expand Down Expand Up @@ -239,3 +241,46 @@ jobs:
gh release upload "${TAG}" \
"/tmp/${PLUGIN}-v${VERSION}.zip" \
--clobber

publish-cli:
name: Publish cli
needs: [release-please]
if: needs.release-please.outputs.paths_released != '' && contains(fromJSON(needs.release-please.outputs.paths_released), 'cli')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install pnpm
run: |
corepack enable
corepack prepare pnpm@latest --activate
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- run: cd cli && pnpm install --frozen-lockfile
- run: cd cli && pnpm build

- name: Publish to GitHub Packages
continue-on-error: true
working-directory: cli
run: |
printf '%s\n%s\n' "@ai-driven-dev:registry=https://npm.pkg.github.com" "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" > .npmrc
pnpm publish --no-git-checks
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Real OIDC trusted publishing (npm CLI >= 11.5.1, Node >= 22.14.0), not a
# token — matches the npmjs.com trusted-publisher entry for
# ai-driven-dev/framework, workflow ci.yml. No NPM_TOKEN secret needed.
# `npm publish`, not `pnpm publish`: pnpm's OIDC support is unverified/
# buggy as of this writing (pnpm/pnpm#9812, #11513) — npm's own CLI is
# the reference implementation for its own feature.
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
registry-url: "https://registry.npmjs.org"
- name: Publish to npm
working-directory: cli
run: |
rm -f .npmrc
npm install -g npm@latest
npm publish --access public
115 changes: 115 additions & 0 deletions .github/workflows/cli-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: cli CI

# Native path-filtered isolation: this whole workflow is skipped when nothing
# under cli/ changed — no third-party paths-filter action needed.

on:
push:
branches: [main, next]
paths:
- "cli/**"
pull_request:
paths:
- "cli/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

permissions:
contents: read

jobs:
cli-typecheck:
name: cli / Typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install pnpm
run: |
corepack enable
corepack prepare pnpm@latest --activate
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- run: cd cli && pnpm install --frozen-lockfile
- run: cd cli && pnpm typecheck

cli-lint:
name: cli / Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install pnpm
run: |
corepack enable
corepack prepare pnpm@latest --activate
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- run: cd cli && pnpm install --frozen-lockfile
- run: cd cli && pnpm lint

cli-test:
name: cli / Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install expect (TTY persona tests)
run: sudo apt-get update && sudo apt-get install -y expect
- name: Install pnpm
run: |
corepack enable
corepack prepare pnpm@latest --activate
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- run: cd cli && pnpm install --frozen-lockfile
- run: cd cli && pnpm test

cli-build:
name: cli / Build & Bundle Budget
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install pnpm
run: |
corepack enable
corepack prepare pnpm@latest --activate
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- run: cd cli && pnpm install --frozen-lockfile
- run: cd cli && pnpm build

cli-knip:
name: cli / Knip (dead code)
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install pnpm
run: |
corepack enable
corepack prepare pnpm@latest --activate
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- run: cd cli && pnpm install --frozen-lockfile
- run: cd cli && pnpm knip:production

cli-jscpd:
name: cli / JSCPD (duplication)
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install pnpm
run: |
corepack enable
corepack prepare pnpm@latest --activate
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- run: cd cli && pnpm install --frozen-lockfile
- run: cd cli && pnpm jscpd
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ jobs:
language: [javascript-typescript]
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Initialize CodeQL
uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
with:
languages: ${{ matrix.language }}
queries: security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
uses: github/codeql-action/autobuild@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
with:
category: "/language:${{ matrix.language }}"
38 changes: 33 additions & 5 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
app-id: ${{ secrets.AIDD_BOT_APP_ID }}
private-key: ${{ secrets.AIDD_BOT_PRIVATE_KEY }}

- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
Expand All @@ -50,14 +50,42 @@ jobs:
BRANCH="promote/next-to-main-linear"
git switch -C "$BRANCH" origin/main
mapfile -t MERGES < <(git rev-list --first-parent --merges --reverse origin/main..origin/next)
if [ "${#MERGES[@]}" -ge 2 ]; then
START="${MERGES[$((${#MERGES[@]} - 2))]}"
# A "sync commit" marks a point where main's history was already
# folded into next by back-merge.yml, so it (and everything before
# it) must NOT be replayed onto main again. back-merge.yml lands a
# sync two ways:
# - no conflicts: a direct-pushed real merge commit (2 parents)
# - conflicts: a PR merged by squash (this repo disallows
# merge-commit PRs), whose subject is stamped verbatim from
# back-merge.yml's fixed PR title
# Both must count as boundaries, or a squash sync gets mistaken for
# genuine next-only work and cherry-picked back onto main, colliding
# with content main already has. Keep the title prefix below in
# sync with back-merge.yml's `gh pr create --title`.
is_sync_commit() {
git rev-parse --verify -q "$1^2" >/dev/null 2>&1 && return 0
local subject
subject="$(git log -1 --format=%s "$1")"
[[ "$subject" == "chore: back-merge main into next"* ]]
}
mapfile -t CANDIDATES < <(git rev-list --first-parent --reverse origin/main..origin/next)
SYNCS=()
for c in "${CANDIDATES[@]}"; do
is_sync_commit "$c" && SYNCS+=("$c")
done
if [ "${#SYNCS[@]}" -ge 2 ]; then
START="${SYNCS[$((${#SYNCS[@]} - 2))]}"
else
START="origin/main"
fi
mapfile -t COMMITS < <(git rev-list --first-parent --reverse --no-merges "${START}..origin/next")
COMMITS=()
while IFS= read -r c; do
is_sync_commit "$c" || COMMITS+=("$c")
done < <(git rev-list --first-parent --reverse "${START}..origin/next")
if [ "${#COMMITS[@]}" -eq 0 ]; then
echo "No commits to promote."
exit 0
Expand Down
Loading
Loading