Skip to content

Commit 5eb848b

Browse files
committed
Remove AI releases
1 parent 4756833 commit 5eb848b

File tree

4 files changed

+101
-222
lines changed

4 files changed

+101
-222
lines changed

.github/actions/ai-release-notes/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ inputs:
2020
default: ''
2121
type: string
2222
git_ref:
23-
required: false
23+
required: true
2424
type: string
2525
default: ''
2626
head_ref:
27-
required: false
27+
required: true
2828
type: string
2929
default: main
3030
base_ref:
31-
required: false
31+
required: true
3232
type: string
3333
default: main
3434

@@ -41,9 +41,9 @@ outputs:
4141
value: ${{ steps.ai_prompt.outputs.OPENAI_PROMPT }}
4242

4343
env:
44-
GITHUB_REF: ${{ inputs.git_ref == '' && github.event.pull_request.head.ref || inputs.git_ref }}
45-
BASE_REF: ${{ inputs.base_ref == '' && github.base_ref || inputs.base_ref }}
46-
HEAD_REF: ${{ inputs.head_ref == '' && github.event.pull_request.head.sha || inputs.head_ref }}
44+
GITHUB_REF: ${{ inputs.git_ref }}
45+
BASE_REF: ${{ inputs.base_ref }}
46+
HEAD_REF: ${{ inputs.head_ref }}
4747

4848
runs:
4949
using: "composite"

.github/workflows/changeset-ai-releases.yml

Lines changed: 0 additions & 216 deletions
This file was deleted.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Changeset Release
2+
run-name: Changeset Release ${{ github.actor != 'R00-B0T' && '- Create PR' || '- Approve & Merge' }}
3+
4+
on:
5+
pull_request:
6+
types: [closed, opened, synchronize, labeled]
7+
8+
env:
9+
REPO_PATH: ${{ github.repository }}
10+
GIT_REF: ${{ github.event.pull_request.head.sha }}
11+
12+
jobs:
13+
# Job 1: Create version bump PR when changesets are merged to main
14+
changeset-pr-version-bump:
15+
if: >
16+
github.event_name == 'pull_request' &&
17+
github.event.pull_request.merged == true &&
18+
github.event.pull_request.base.ref == 'main' &&
19+
github.actor != 'R00-B0T'
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write
23+
pull-requests: write
24+
steps:
25+
- name: Git Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
ref: ${{ env.GIT_REF }}
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: 20
35+
cache: 'npm'
36+
37+
- name: Install Dependencies
38+
run: npm install
39+
40+
# Check if there are any new changesets to process
41+
- name: Check for changesets
42+
id: check-changesets
43+
run: |
44+
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
45+
echo "Changesets diff with previous version: $NEW_CHANGESETS"
46+
echo "new_changesets=$NEW_CHANGESETS" >> $GITHUB_OUTPUT
47+
48+
# Create version bump PR using changesets/action if there are new changesets
49+
- name: Changeset Pull Request
50+
if: steps.check-changesets.outputs.new_changesets != '0'
51+
id: changesets
52+
uses: changesets/action@v1
53+
with:
54+
commit: "changeset version bump"
55+
title: "Changeset version bump"
56+
version: npm run version-packages # This performs the changeset version bump
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.CROSS_REPO_ACCESS_TOKEN }}
59+
60+
# Job 2: Process version bump PR created by R00-B0T
61+
changeset-pr-approve-merge:
62+
name: Auto approve and merge Bump version PRs
63+
runs-on: ubuntu-latest
64+
permissions:
65+
contents: write
66+
pull-requests: write
67+
if: >
68+
github.event_name == 'pull_request' &&
69+
github.event.pull_request.base.ref == 'main' &&
70+
github.actor == 'R00-B0T' &&
71+
contains(github.event.pull_request.title, 'Changeset version bump')
72+
73+
steps:
74+
- name: Checkout Repo
75+
uses: actions/checkout@v4
76+
with:
77+
token: ${{ secrets.CROSS_REPO_ACCESS_TOKEN }}
78+
fetch-depth: 0
79+
ref: ${{ env.GIT_REF }}
80+
81+
# Auto-approve PR
82+
- name: Auto approve PR
83+
uses: hmarr/auto-approve-action@v4
84+
with:
85+
review-message: "I'm approving since it's a bump version PR"
86+
87+
# Enable auto-merge for the PR
88+
- name: Enable automerge on PR
89+
run: gh pr merge --squash --auto ${{ github.event.pull_request.number }}
90+
env:
91+
GH_TOKEN: ${{ secrets.CROSS_REPO_ACCESS_TOKEN }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ node_modules
88
# Builds
99
bin/
1010
roo-cline-*.vsix
11+
12+
# Local prompts and rules
13+
prompts
14+
.clinerules

0 commit comments

Comments
 (0)