From 74a016338b5df09d30494bcfa5bea21693e758b4 Mon Sep 17 00:00:00 2001 From: a8trejo Date: Tue, 17 Dec 2024 16:19:20 -0800 Subject: [PATCH 1/3] Trying no auto flag --- .github/workflows/changeset-release.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/changeset-release.yml b/.github/workflows/changeset-release.yml index b39a68c..fabb62c 100644 --- a/.github/workflows/changeset-release.yml +++ b/.github/workflows/changeset-release.yml @@ -69,7 +69,6 @@ jobs: github.event.pull_request.base.ref == 'main' && github.actor == 'R00-B0T' && contains(github.event.pull_request.title, 'Changeset version bump') - steps: - name: Checkout Repo uses: actions/checkout@v4 @@ -77,15 +76,14 @@ jobs: token: ${{ secrets.CROSS_REPO_ACCESS_TOKEN }} fetch-depth: 0 ref: ${{ env.GIT_REF }} - # Auto-approve PR - name: Auto approve PR uses: hmarr/auto-approve-action@v4 with: review-message: "I'm approving since it's a bump version PR" - - # Enable auto-merge for the PR - - name: Enable automerge on PR - run: gh pr merge --merge --auto ${{ github.event.pull_request.number }} + + # Auto-merge PR + - name: Automerge on PR + run: gh pr merge --merge ${{ github.event.pull_request.number }} env: GH_TOKEN: ${{ secrets.CROSS_REPO_ACCESS_TOKEN }} From fa23dc07379b8005c5dcf0d38eaf938a5bdaf2dd Mon Sep 17 00:00:00 2001 From: a8trejo Date: Tue, 17 Dec 2024 16:20:06 -0800 Subject: [PATCH 2/3] format fixes --- CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dadd3ad..2ab4d61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,6 @@ # Roo Cline Changelog -## 2.2.17 - -### Patch Changes +## [2.2.17] - Improved regex for auto-execution of chained commands From c9e07cca58b7e6db9c5c4d0208b263c529c4d82a Mon Sep 17 00:00:00 2001 From: a8trejo Date: Tue, 17 Dec 2024 17:16:46 -0800 Subject: [PATCH 3/3] Workflows updates to manually merge changeset PRs and control those changes --- .changeset/changelog-config.js | 7 ++++++- .github/workflows/changeset-release.yml | 5 +++-- .github/workflows/marketplace-publish.yml | 20 +++++++++++++++----- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.changeset/changelog-config.js b/.changeset/changelog-config.js index 6600ba3..28f6d25 100644 --- a/.changeset/changelog-config.js +++ b/.changeset/changelog-config.js @@ -3,16 +3,21 @@ const getReleaseLine = async (changeset) => { .split('\n') .map(l => l.trim()) .filter(Boolean); - return `- ${firstLine}`; + return `- ${firstLine}`; }; const getDependencyReleaseLine = async () => { return ''; }; +const getReleaseSummary = async (release) => { + return `## [${release.newVersion}]\n\n`; +}; + const changelogFunctions = { getReleaseLine, getDependencyReleaseLine, + getReleaseSummary, }; module.exports = changelogFunctions; \ No newline at end of file diff --git a/.github/workflows/changeset-release.yml b/.github/workflows/changeset-release.yml index fabb62c..eaad3c6 100644 --- a/.github/workflows/changeset-release.yml +++ b/.github/workflows/changeset-release.yml @@ -1,5 +1,5 @@ name: Changeset Release -run-name: Changeset Release ${{ github.actor != 'R00-B0T' && '- Create PR' || '- Approve & Merge' }} +run-name: Changeset Release ${{ github.actor != 'R00-B0T' && '- Create PR' || '- Ready for Review' }} on: pull_request: @@ -84,6 +84,7 @@ jobs: # Auto-merge PR - name: Automerge on PR - run: gh pr merge --merge ${{ github.event.pull_request.number }} + if: false # Needs enablePullRequestAutoMerge in repo settings to work + run: gh pr merge --auto --merge ${{ github.event.pull_request.number }} env: GH_TOKEN: ${{ secrets.CROSS_REPO_ACCESS_TOKEN }} diff --git a/.github/workflows/marketplace-publish.yml b/.github/workflows/marketplace-publish.yml index a5fdbbc..201ef5a 100644 --- a/.github/workflows/marketplace-publish.yml +++ b/.github/workflows/marketplace-publish.yml @@ -1,16 +1,26 @@ name: Publish Extension on: - push: - branches: ["main"] + pull_request: + types: [closed] workflow_dispatch: +env: + GIT_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'main' }} + jobs: publish-extension: runs-on: ubuntu-latest - if: ${{ github.actor == 'R00-B0T' || github.event_name == 'workflow_dispatch' }} + if: > + ( github.event_name == 'pull_request' && + github.event.pull_request.base.ref == 'main' && + contains(github.event.pull_request.title, 'Changeset version bump') ) || + github.event_name == 'workflow_dispatch' steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + with: + ref: ${{ env.GIT_REF }} + + - uses: actions/setup-node@v4 with: node-version: 18 - run: |