mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-08 03:07:53 +00:00
Revert "Merge pull request #61 from RooVetGit/chores/changeset-releases"
This reverts commit2f2c0609ba, reversing changes made to70639ec0df.
This commit is contained in:
parent
095a8e9852
commit
d7e24f4877
12 changed files with 5 additions and 1912 deletions
|
|
@ -1,8 +0,0 @@
|
|||
# Changesets
|
||||
|
||||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
||||
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
||||
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
||||
|
||||
We have a quick list of common questions to get you started engaging with this project in
|
||||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"$schema": "https://unpkg.com/@changesets/config@3.0.4/schema.json",
|
||||
"changelog": "@changesets/cli/changelog",
|
||||
"commit": false,
|
||||
"fixed": [],
|
||||
"linked": [],
|
||||
"access": "restricted",
|
||||
"baseBranch": "main",
|
||||
"updateInternalDependencies": "patch",
|
||||
"ignore": []
|
||||
}
|
||||
28
.github/pull_request_template.md
vendored
28
.github/pull_request_template.md
vendored
|
|
@ -1,28 +0,0 @@
|
|||
<!-- **Note:** Consider creating PRs as a DRAFT. For early feedback and self-review. -->
|
||||
## Description
|
||||
|
||||
## Type of change
|
||||
<!-- Please ignore options that are not relevant -->
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] This change requires a documentation update
|
||||
|
||||
## How Has This Been Tested?
|
||||
<!-- Please describe the tests that you ran to verify your changes -->
|
||||
|
||||
## Checklist:
|
||||
<!-- Go over all the following points, and put an `x` in all the boxes that apply -->
|
||||
- [ ] My code follows the patterns of this project
|
||||
- [ ] I have performed a self-review of my own code
|
||||
- [ ] I have commented my code, particularly in hard-to-understand areas
|
||||
- [ ] I have made corresponding changes to the documentation
|
||||
|
||||
## Additional context
|
||||
<!-- Add any other context or screenshots about the pull request here -->
|
||||
|
||||
## Related Issues
|
||||
<!-- List any related issues here. Use the GitHub issue linking syntax: #issue-number -->
|
||||
|
||||
## Reviewers
|
||||
<!-- @mention specific team members or individuals who should review this PR -->
|
||||
60
.github/scripts/overwrite_changeset_changelog.py
vendored
60
.github/scripts/overwrite_changeset_changelog.py
vendored
|
|
@ -1,60 +0,0 @@
|
|||
"""
|
||||
This script updates a specific version's release notes section in CHANGELOG.md with new content.
|
||||
|
||||
The script:
|
||||
1. Takes a version number, changelog path, and new content as input from environment variables
|
||||
2. Finds the section in the changelog for the specified version
|
||||
3. Replaces the content between the current version header and the next version header
|
||||
(or end of file if it's the latest version) with the new content
|
||||
4. Writes the updated changelog back to the file
|
||||
|
||||
Environment Variables:
|
||||
CHANGELOG_PATH: Path to the changelog file (defaults to 'CHANGELOG.md')
|
||||
VERSION: The version number to update notes for
|
||||
PREV_VERSION: The previous version number (optional)
|
||||
NEW_CONTENT: The new content to insert for this version
|
||||
"""
|
||||
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
|
||||
CHANGELOG_PATH = os.environ.get("CHANGELOG_PATH", "CHANGELOG.md")
|
||||
VERSION = os.environ['VERSION']
|
||||
PREV_VERSION = os.environ.get("PREV_VERSION", "")
|
||||
NEW_CONTENT = os.environ['NEW_CONTENT']
|
||||
|
||||
def overwrite_changelog_section(content: str):
|
||||
"""Replace a specific version section in the changelog content.
|
||||
|
||||
Args:
|
||||
content: The full changelog content as a string
|
||||
|
||||
Returns:
|
||||
The updated changelog content with the new section
|
||||
|
||||
Example:
|
||||
>>> content = "## 1.2.0\\nOld changes\\n## 1.1.0\\nOld changes"
|
||||
>>> NEW_CONTENT = "New changes"
|
||||
>>> overwrite_changelog_section(content)
|
||||
'## 1.2.0\\nNew changes\\n## 1.1.0\\nOld changes'
|
||||
"""
|
||||
# Find the section for the specified version
|
||||
version_pattern = f"## {VERSION}\n"
|
||||
print(f"latest version: {VERSION}")
|
||||
notes_start_index = content.find(version_pattern) + len(version_pattern)
|
||||
print(f"prev_version: {PREV_VERSION}")
|
||||
prev_version_pattern = f"## {PREV_VERSION}\n"
|
||||
notes_end_index = content.find(prev_version_pattern, notes_start_index) if PREV_VERSION and prev_version_pattern in content else len(content)
|
||||
return content[:notes_start_index] + f"{NEW_CONTENT}\n" + content[notes_end_index:]
|
||||
|
||||
with open(CHANGELOG_PATH, 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
new_changelog = overwrite_changelog_section(content)
|
||||
|
||||
print(new_changelog)
|
||||
|
||||
# Write back to CHANGELOG.md
|
||||
with open(CHANGELOG_PATH, 'w') as f:
|
||||
f.write(new_changelog)
|
||||
64
.github/scripts/parse_changeset_changelog.py
vendored
64
.github/scripts/parse_changeset_changelog.py
vendored
|
|
@ -1,64 +0,0 @@
|
|||
"""
|
||||
This script extracts the release notes section for a specific version from CHANGELOG.md.
|
||||
|
||||
The script:
|
||||
1. Takes a version number and changelog path as input from environment variables
|
||||
2. Finds the section in the changelog for the specified version
|
||||
3. Extracts the content between the current version header and the next version header
|
||||
(or end of file if it's the latest version)
|
||||
4. Outputs the extracted release notes to GITHUB_OUTPUT for use in creating GitHub releases
|
||||
|
||||
Environment Variables:
|
||||
GITHUB_OUTPUT: Path to GitHub Actions output file
|
||||
CHANGELOG_PATH: Path to the changelog file (defaults to 'CHANGELOG.md')
|
||||
VERSION: The version number to extract notes for
|
||||
"""
|
||||
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
GITHUB_OUTPUT = os.getenv("GITHUB_OUTPUT")
|
||||
CHANGELOG_PATH = os.environ.get("CHANGELOG_PATH", "CHANGELOG.md")
|
||||
VERSION = os.environ['VERSION']
|
||||
|
||||
def parse_changelog_section(content: str):
|
||||
"""Parse a specific version section from the changelog content.
|
||||
|
||||
Args:
|
||||
content: The full changelog content as a string
|
||||
|
||||
Returns:
|
||||
The formatted content for this version, or None if version not found
|
||||
|
||||
Example:
|
||||
>>> content = "## 1.2.0\\nChanges\\n## 1.1.0\\nOld changes"
|
||||
>>> parse_changelog_section(content)
|
||||
'Changes\\n'
|
||||
"""
|
||||
# Find the section for the specified version
|
||||
version_pattern = f"## {VERSION}\n"
|
||||
print(f"latest version: {VERSION}")
|
||||
notes_start_index = content.find(version_pattern) + len(version_pattern)
|
||||
prev_version = subprocess.getoutput("git show origin/main:package.json | grep '\"version\":' | cut -d'\"' -f4")
|
||||
print(f"prev_version: {prev_version}")
|
||||
prev_version_pattern = f"## {prev_version}\n"
|
||||
notes_end_index = content.find(prev_version_pattern, notes_start_index) if prev_version_pattern in content else len(content)
|
||||
|
||||
return content[notes_start_index:notes_end_index]
|
||||
|
||||
with open(CHANGELOG_PATH, 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
formatted_content = parse_changelog_section(content)
|
||||
if not formatted_content:
|
||||
print(f"Version {VERSION} not found in changelog", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
print(formatted_content)
|
||||
|
||||
# Write the extracted release notes to GITHUB_OUTPUT
|
||||
with open(GITHUB_OUTPUT, "a") as gha_output:
|
||||
gha_output.write(f"release-notes<<EOF\n{formatted_content}\nEOF")
|
||||
125
.github/scripts/release-notes-prompt.py
vendored
125
.github/scripts/release-notes-prompt.py
vendored
|
|
@ -1,125 +0,0 @@
|
|||
import os
|
||||
import subprocess
|
||||
import json
|
||||
import re
|
||||
import tiktoken # type: ignore
|
||||
from datetime import datetime;
|
||||
from pytz import timezone
|
||||
|
||||
GITHUB_OUTPUT = os.getenv("GITHUB_OUTPUT")
|
||||
BASE_REF = os.getenv("BASE_REF", "main")
|
||||
HEAD_SHA = os.environ["HEAD_SHA"]
|
||||
PR_TITLE = os.environ["PR_TITLE"]
|
||||
PR_BODY = os.environ["PR_BODY"]
|
||||
EXISTING_NOTES = os.environ.get("EXISTING_NOTES", "null")
|
||||
MODEL_NAME = os.environ.get('MODEL_NAME', 'gpt-3.5-turbo-16k')
|
||||
CUSTOM_PROMPT = os.environ.get('CUSTOM_PROMPT', '')
|
||||
|
||||
def extract_description_section(pr_body):
|
||||
# Find content between ## Description and the next ## or end of text
|
||||
description_match = re.search(r'## Description\s*\n(.*?)(?=\n##|$)', pr_body, re.DOTALL)
|
||||
if description_match:
|
||||
content = description_match.group(1).strip()
|
||||
# Remove the comment line if it exists
|
||||
comment_pattern = r'\[comment\]:.+?\n'
|
||||
content = re.sub(comment_pattern, '', content)
|
||||
return content.strip()
|
||||
return ""
|
||||
|
||||
def extract_ellipsis_important(pr_body):
|
||||
# Find content between <!-- ELLIPSIS_HIDDEN --> and <!-- ELLIPSIS_HIDDEN --> that contains [!IMPORTANT]
|
||||
ellipsis_match = re.search(r'<!--\s*ELLIPSIS_HIDDEN\s*-->(.*?)<!--\s*ELLIPSIS_HIDDEN\s*-->', pr_body, re.DOTALL)
|
||||
if ellipsis_match:
|
||||
content = ellipsis_match.group(1).strip()
|
||||
important_match = re.search(r'\[!IMPORTANT\](.*?)(?=\[!|$)', content, re.DOTALL)
|
||||
if important_match:
|
||||
important_text = important_match.group(1).strip()
|
||||
important_text = re.sub(r'^-+\s*', '', important_text)
|
||||
return important_text.strip()
|
||||
return ""
|
||||
|
||||
def extract_coderabbit_summary(pr_body):
|
||||
# Find content between ## Summary by CodeRabbit and the next ## or end of text
|
||||
summary_match = re.search(r'## Summary by CodeRabbit\s*\n(.*?)(?=\n##|$)', pr_body, re.DOTALL)
|
||||
return summary_match.group(1).strip() if summary_match else ""
|
||||
|
||||
def num_tokens_from_string(string: str, model_name: str) -> int:
|
||||
"""
|
||||
Calculate the number of tokens in a text string for a specific model.
|
||||
|
||||
Args:
|
||||
string: The input text to count tokens for
|
||||
model_name: Name of the OpenAI model to use for token counting
|
||||
|
||||
Returns:
|
||||
int: Number of tokens in the input string
|
||||
"""
|
||||
encoding = tiktoken.encoding_for_model(model_name)
|
||||
num_tokens = len(encoding.encode(string))
|
||||
return num_tokens
|
||||
|
||||
def truncate_to_token_limit(text, max_tokens, model_name):
|
||||
"""
|
||||
Truncate text to fit within a maximum token limit for a specific model.
|
||||
|
||||
Args:
|
||||
text: The input text to truncate
|
||||
max_tokens: Maximum number of tokens allowed
|
||||
model_name: Name of the OpenAI model to use for tokenization
|
||||
|
||||
Returns:
|
||||
str: Truncated text that fits within the token limit
|
||||
"""
|
||||
encoding = tiktoken.encoding_for_model(model_name)
|
||||
encoded = encoding.encode(text)
|
||||
truncated = encoded[:max_tokens]
|
||||
return encoding.decode(truncated)
|
||||
|
||||
# Extract sections and combine into PR_OVERVIEW
|
||||
description = extract_description_section(PR_BODY)
|
||||
important = extract_ellipsis_important(PR_BODY)
|
||||
summary = extract_coderabbit_summary(PR_BODY)
|
||||
|
||||
PR_OVERVIEW = "\n\n".join(filter(None, [description, important, summary]))
|
||||
|
||||
# Get git information
|
||||
base_sha = subprocess.getoutput(f"git rev-parse origin/{BASE_REF}") if BASE_REF == 'main' else BASE_REF
|
||||
diff_overview = subprocess.getoutput(f"git diff {base_sha}..{HEAD_SHA} --name-status | awk '{{print $2}}' | sort | uniq -c | awk '{{print $2 \": \" $1 \" files changed\"}}'")
|
||||
git_log = subprocess.getoutput(f"git log {base_sha}..{HEAD_SHA} --pretty=format:'%h - %s (%an)' --reverse | head -n 50")
|
||||
git_diff = subprocess.getoutput(f"git diff {base_sha}..{HEAD_SHA} --minimal --abbrev --ignore-cr-at-eol --ignore-space-at-eol --ignore-space-change --ignore-all-space --ignore-blank-lines --unified=0 --diff-filter=ACDMRT")
|
||||
|
||||
max_tokens = 14000 # Reserve some tokens for the response
|
||||
changes_summary = truncate_to_token_limit(diff_overview, 1000, MODEL_NAME)
|
||||
git_logs = truncate_to_token_limit(git_log, 2000, MODEL_NAME)
|
||||
changes_diff = truncate_to_token_limit(git_diff, max_tokens - num_tokens_from_string(changes_summary, MODEL_NAME) - num_tokens_from_string(git_logs, MODEL_NAME) - 1000, MODEL_NAME)
|
||||
|
||||
# Get today's existing changelog if any
|
||||
existing_changelog = EXISTING_NOTES if EXISTING_NOTES != "null" else None
|
||||
existing_changelog_text = f"\nAdditional context:\n{existing_changelog}" if existing_changelog else ""
|
||||
TODAY = datetime.now(timezone('US/Eastern')).isoformat(sep=' ', timespec='seconds')
|
||||
|
||||
BASE_PROMPT = CUSTOM_PROMPT if CUSTOM_PROMPT else f"""Based on the following 'PR Information', please generate concise and informative release notes to be read by developers.
|
||||
Format the release notes with markdown, and always use this structure: a descriptive and very short title (no more than 8 words) with heading level 2, a paragraph with a summary of changes (no header), and if applicable, sections for '🚀 New Features & Improvements', '🐛 Bugs Fixed' and '🔧 Other Updates', with heading level 3, skip respectively the sections if not applicable.
|
||||
Finally include the following markdown comment with the PR merged date: <!-- PR_DATE: {TODAY} -->.
|
||||
Avoid being repetitive and focus on the most important changes and their impact, discard any mention of version bumps/updates, changeset files, environment variables or syntax updates.
|
||||
PR Information:"""
|
||||
|
||||
OPENAI_PROMPT = f"""{BASE_PROMPT}
|
||||
Git log summary:
|
||||
{changes_summary}
|
||||
Commit Messages:
|
||||
{git_logs}
|
||||
PR Title:
|
||||
{PR_TITLE}
|
||||
PR Overview:
|
||||
{PR_OVERVIEW}{existing_changelog_text}
|
||||
Code Diff:
|
||||
{json.dumps(changes_diff)}"""
|
||||
|
||||
print("OpenAI Prompt")
|
||||
print("----------------------------------------------------------------")
|
||||
print(OPENAI_PROMPT)
|
||||
|
||||
# Write the prompt to GITHUB_OUTPUT
|
||||
with open(GITHUB_OUTPUT, "a") as outputs_file:
|
||||
outputs_file.write(f"OPENAI_PROMPT<<EOF\n{OPENAI_PROMPT}\nEOF")
|
||||
215
.github/workflows/changeset-ai-releases.yml
vendored
215
.github/workflows/changeset-ai-releases.yml
vendored
|
|
@ -1,215 +0,0 @@
|
|||
name: Changeset AI Release
|
||||
run-name: Changeset AI Release ${{ github.actor != 'R00-B0T' && '- Create PR' || '- Approve & Release' }}
|
||||
|
||||
# This workflow automates the release process by:
|
||||
# 1. Creating a version bump PR when changesets are merged to main
|
||||
# 2. Using AI to generate release notes for the version bump PR
|
||||
# 3. Auto-approving and merging the version bump PR
|
||||
# 4. Creating a GitHub release with the AI-generated notes
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed, opened, synchronize, labeled]
|
||||
|
||||
env:
|
||||
REPO_PATH: ${{ github.repository }}
|
||||
GIT_REF: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
jobs:
|
||||
# Job 1: Create version bump PR when changesets are merged to main
|
||||
changeset-pr-version-bump:
|
||||
if: >
|
||||
github.event_name == 'pull_request' &&
|
||||
github.event.pull_request.merged == true &&
|
||||
github.event.pull_request.base.ref == 'main' &&
|
||||
github.actor != 'R00-B0T'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Git Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ env.GIT_REF }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
||||
# Check if there are any new changesets to process
|
||||
- name: Check for changesets
|
||||
id: check-changesets
|
||||
run: |
|
||||
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
|
||||
echo "Changesets diff with previous version: $NEW_CHANGESETS"
|
||||
echo "new_changesets=$NEW_CHANGESETS" >> $GITHUB_OUTPUT
|
||||
|
||||
# Create version bump PR using changesets/action if there are new changesets
|
||||
- name: Changeset Pull Request
|
||||
if: steps.check-changesets.outputs.new_changesets != '0'
|
||||
id: changesets
|
||||
uses: changesets/action@v1
|
||||
with:
|
||||
commit: "changeset version bump"
|
||||
title: "Changeset version bump"
|
||||
version: npm run version-packages # This performs the changeset version bump
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.CROSS_REPO_ACCESS_TOKEN }}
|
||||
|
||||
# Job 2: Process version bump PR created by R00-B0T
|
||||
changeset-pr-approve-merge:
|
||||
name: Auto approve and merge Bump version PRs
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
if: >
|
||||
github.event_name == 'pull_request' &&
|
||||
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
|
||||
with:
|
||||
token: ${{ secrets.CROSS_REPO_ACCESS_TOKEN }}
|
||||
fetch-depth: 0
|
||||
ref: ${{ env.GIT_REF }}
|
||||
|
||||
# Get current and previous versions for changelog processing
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(git show HEAD:package.json | jq -r '.version')
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
PREV_VERSION=$(git show origin/main:package.json | jq -r '.version')
|
||||
echo "prev_version=$PREV_VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "version=$VERSION"
|
||||
echo "prev_version=$PREV_VERSION"
|
||||
|
||||
# Get previous version refs, GITHUB_OUTPUT: 'BASE_REF' and 'HEAD_REF'
|
||||
- name: Get Previous Version Refs
|
||||
id: version_refs
|
||||
run: python .github/scripts/get_prev_version_refs.py
|
||||
|
||||
# Generate release notes using OpenAI if not already edited, GITHUB_OUTPUT: 'RELEASE_NOTES' and 'OPENAI_PROMPT'
|
||||
- name: AI Release Notes
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'openai-edited') }}
|
||||
uses: ./.github/actions/ai-release-notes
|
||||
id: ai_release_notes
|
||||
with:
|
||||
GHA_PAT: ${{ secrets.CROSS_REPO_ACCESS_TOKEN }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
model_name: gpt-4o-mini
|
||||
repo_path: ${{ env.REPO_PATH }}
|
||||
base_ref: ${{ steps.version_refs.outputs.base_ref }}
|
||||
head_ref: ${{ steps.version_refs.outputs.head_ref }}
|
||||
|
||||
# Update CHANGELOG.md with AI-generated notes
|
||||
- name: Update Changeset Changelog
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'openai-edited') }}
|
||||
env:
|
||||
VERSION: ${{ steps.get_version.outputs.version }}
|
||||
PREV_VERSION: ${{ steps.get_version.outputs.prev_version }}
|
||||
NEW_CONTENT: ${{ steps.ai_release_notes.outputs.RELEASE_NOTES }}
|
||||
run: python .github/scripts/overwrite_changeset_changelog.py
|
||||
|
||||
# Commit and push changelog updates
|
||||
- name: Push Changelog updates
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'openai-edited') }}
|
||||
run: |
|
||||
git config user.name "R00-B0T"
|
||||
git config user.email github-actions@github.com
|
||||
git status
|
||||
|
||||
echo "Updating changelog.md..."
|
||||
git add CHANGELOG.md
|
||||
git commit -m "Updating changeset changelog"
|
||||
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo "Pushing to remote..."
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
git push
|
||||
|
||||
# Add label to indicate OpenAI has processed this PR
|
||||
- name: Add openai-edited label
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'openai-edited') }}
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
await github.rest.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
labels: ['openai-edited']
|
||||
});
|
||||
|
||||
# Auto-approve PR once OpenAI has processed it
|
||||
- name: Auto approve PR
|
||||
if: contains(github.event.pull_request.labels.*.name, 'openai-edited')
|
||||
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
|
||||
if: contains(github.event.pull_request.labels.*.name, 'openai-edited')
|
||||
run: gh pr merge --squash --auto ${{ github.event.pull_request.number }}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.CROSS_REPO_ACCESS_TOKEN }}
|
||||
|
||||
# Job 3: Create GitHub release after version bump PR is merged
|
||||
github-release:
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
github.event_name == 'pull_request' &&
|
||||
github.event.pull_request.merged == true &&
|
||||
github.event.pull_request.base.ref == 'main' &&
|
||||
github.actor == 'R00-B0T' &&
|
||||
contains(github.event.pull_request.title, 'Changeset version bump')
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(git show HEAD:package.json | jq -r '.version')
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
# Extract release notes from CHANGELOG.md, GITHUB_OUTPUT: 'release-notes'
|
||||
- name: Parse CHANGELOG.md
|
||||
id: changelog
|
||||
env:
|
||||
CHANGELOG_PATH: CHANGELOG.md
|
||||
VERSION: ${{ steps.get_version.outputs.version }}
|
||||
run: python .github/scripts/parse_changeset_changelog.py
|
||||
|
||||
# Create GitHub release with extracted notes
|
||||
- name: Create or Update Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: v${{ steps.get_version.outputs.version }}
|
||||
name: Release v${{ steps.get_version.outputs.version }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
append_body: false
|
||||
make_latest: true
|
||||
body: ${{ steps.changelog.outputs.release-notes }}
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -5,6 +5,6 @@ node_modules
|
|||
|
||||
.DS_Store
|
||||
|
||||
# Builds
|
||||
bin/
|
||||
|
||||
roo-cline-*.vsix
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
branch="$(git rev-parse --abbrev-ref HEAD)"
|
||||
|
||||
if [ "$branch" = "main" ]; then
|
||||
echo "You can't push directly to main - please check out a branch."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
npm run compile
|
||||
|
||||
# Check for new changesets
|
||||
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
|
||||
echo "Changeset files: $NEW_CHANGESETS"
|
||||
if [ "$NEW_CHANGESETS" == "0" ]; then
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
echo "Changes detected. Please run 'npm run changeset' to create a changeset if applicable."
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
fi
|
||||
59
README.md
59
README.md
|
|
@ -21,61 +21,6 @@ Here's an example of Roo-Cline autonomously creating a snake game with "Always a
|
|||
|
||||
https://github.com/user-attachments/assets/c2bb31dc-e9b2-4d73-885d-17f1471a4987
|
||||
|
||||
## Contributing
|
||||
To contribute to the project, start by exploring [open issues](https://github.com/RooVetGit/Roo-Cline/issues) or checking our [feature request board](https://github.com/cline/cline/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop). We'd also love to have you join our [Discord](https://discord.gg/cline) to share ideas and connect with other contributors.
|
||||
|
||||
<details>
|
||||
<summary>Local Setup</summary>
|
||||
|
||||
1. Install dependencies:
|
||||
```bash
|
||||
npm run install:all
|
||||
```
|
||||
|
||||
2. Build the VSIX file:
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
3. The new VSIX file will be created in the `bin/` directory
|
||||
4. Install the extension from the VSIX file as described below:
|
||||
|
||||
- **Option 1:** Drag and drop the `.vsix` file into your VSCode-compatible editor's Extensions panel (Cmd/Ctrl+Shift+X).
|
||||
|
||||
- **Option 2:** Install the plugin using the CLI, make sure you have your VSCode-compatible CLI installed and in your `PATH` variable. Cursor example: `export PATH="$PATH:/Applications/Cursor.app/Contents/MacOS"`
|
||||
|
||||
```bash
|
||||
# Ex: cursor --install-extension bin/roo-cline-2.0.1.vsix
|
||||
# Ex: code --install-extension bin/roo-cline-2.0.1.vsix
|
||||
```
|
||||
|
||||
5. Launch by pressing `F5` (or `Run`->`Start Debugging`) to open a new VSCode window with the extension loaded. (You may need to install the [esbuild problem matchers extension](https://marketplace.visualstudio.com/items?itemName=connor4312.esbuild-problem-matchers) if you run into issues building the project.)
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Publishing</summary>
|
||||
We use [changesets](https://github.com/changesets/changesets) for versioning and publishing this package. To make changes:
|
||||
|
||||
1. Create a PR with your changes
|
||||
2. Create a new changeset by running `npm run changeset`
|
||||
- Select the appropriate kind of change - `patch` for bug fixes, `minor` for new features, or `major` for breaking changes
|
||||
- Write a clear description of your changes that will be included in the changelog
|
||||
3. Get the PR approved and pass all checks
|
||||
4. Merge it
|
||||
|
||||
Once your merge is successful:
|
||||
- The release workflow will automatically create a new "Changeset version bump" PR
|
||||
- This PR will:
|
||||
- Update the version based on your changeset
|
||||
- Update the `CHANGELOG.md` file
|
||||
- Create a git tag
|
||||
- The PR will be automatically approved and merged
|
||||
- A new version and git release will be published
|
||||
|
||||
</details>
|
||||
|
||||
## Stay Updated!
|
||||
Subscribe to our [Github releases](https://github.com/RooVetGit/Roo-Cline/releases) to keep up with the latest updates! You can also view our [CHANGELOG.md](Roo-Cline/CHANGELOG.md) for more details.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -114,10 +59,10 @@ Thanks to [Claude 3.5 Sonnet's agentic coding capabilities](https://www-cdn.ant
|
|||
- Create and edit files + monitor linter/compiler errors along the way, letting him proactively fix issues like missing imports and syntax errors on his own.
|
||||
- Execute commands directly in your terminal and monitor their output as he works, letting him e.g., react to dev server issues after editing a file.
|
||||
- For web development tasks, Cline can launch the site in a headless browser, click, type, scroll, and capture screenshots + console logs, allowing him to fix runtime errors and visual bugs.
|
||||
4. When a task is completed, Cline will present the result to you with a terminal command like `open -a "Google Chrome" index.html`, which you run with a click of a button.
|
||||
4. When a task is completed, Cline will present the result to you with a terminal command like `open -a "Google Chrome" index.html`, which you run with a click of a button.
|
||||
|
||||
> [!TIP]
|
||||
> Use the `CMD/CTRL + Shift + P` shortcut to open the command palette and type "Cline: Open In New Tab" to open the extension as a tab in your editor. This lets you use Cline side-by-side with your file explorer, and see how he changes your workspace more clearly.
|
||||
> Use the `CMD/CTRL + Shift + P` shortcut to open the command palette and type "Cline: Open In New Tab" to open the extension as a tab in your editor. This lets you use Cline side-by-side with your file explorer, and see how he changes your workspace more clearly.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
1324
package-lock.json
generated
1324
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -171,7 +171,6 @@
|
|||
"watch-tests": "tsc -p . -w --outDir out"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.27.10",
|
||||
"@types/diff": "^5.2.1",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/mocha": "^10.0.7",
|
||||
|
|
@ -182,9 +181,7 @@
|
|||
"@vscode/test-electron": "^2.4.0",
|
||||
"esbuild": "^0.24.0",
|
||||
"eslint": "^8.57.0",
|
||||
"husky": "^9.1.7",
|
||||
"jest": "^29.7.0",
|
||||
"lint-staged": "^15.2.11",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"ts-jest": "^29.2.5",
|
||||
"typescript": "^5.4.5"
|
||||
|
|
@ -209,6 +206,7 @@
|
|||
"diff": "^5.2.0",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"globby": "^14.0.2",
|
||||
"husky": "^9.1.7",
|
||||
"isbinaryfile": "^5.0.2",
|
||||
"mammoth": "^1.8.0",
|
||||
"monaco-vscode-textmate-theme-converter": "^0.1.7",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue