Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/itchy-hounds-cross.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/new-nails-search.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/issue-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ jobs:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
echo "Running MyCoder for issue #${{ github.event.issue.number }} with prompt: ${{ steps.extract-prompt.outputs.prompt }}"
mycoder --githubMode true --userPrompt false "On issue #${{ github.event.issue.number }} the user asked: '${{ steps.extract-prompt.outputs.prompt }}' in comment ${{ steps.extract-prompt.outputs.comment_url }}. Please address this request. If you create a PR or take actions outside the scope of this issue, please report back to the issue with a comment explaining what you did."
mycoder --githubMode true --userPrompt false "On issue #${{ github.event.issue.number }} the user asked: '${{ steps.extract-prompt.outputs.prompt }}' in comment ${{ steps.extract-prompt.outputs.comment_url }}. Please address this request. If you create a PR or take actions outside the scope of this issue, please report back to the issue with a comment explaining what you did."
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release

on:
push:
branches:
- release

permissions:
contents: write
issues: write
pull-requests: write
packages: write

env:
PNPM_VERSION: 10.2.1
NODE_VERSION: 23

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

- name: Install browsers
run: cd packages/agent && pnpm exec playwright install --with-deps chromium

- name: Test
run: pnpm test

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm semantic-release
27 changes: 27 additions & 0 deletions .gitmessage
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# <type>(<scope>): <subject>
# |<---- Using a maximum of 50 characters ---->|

# Explain why this change is being made
# |<---- Try to limit each line to a maximum of 72 characters ---->|

# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23

# --- COMMIT END ---
# Type can be
# feat (new feature)
# fix (bug fix)
# docs (changes to documentation)
# style (formatting, missing semi colons, etc; no code change)
# refactor (refactoring production code)
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
# --------------------
# Remember to
# - Capitalize the subject line
# - Use the imperative mood in the subject line
# - Do not end the subject line with a period
# - Separate subject from body with a blank line
# - Use the body to explain what and why vs. how
# - Can use multiple lines with "-" for bullet points in body
# --------------------
2 changes: 2 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Validate commit message with commitlint
npx --no -- commitlint --edit $1
17 changes: 17 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
54 changes: 48 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,43 @@ This project and everyone participating in it is governed by our Code of Conduct
4. Commit your changes:

```bash
git commit -m "feat: add your feature description"
git commit
```

Follow [Conventional Commits](https://www.conventionalcommits.org/) specification.
We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for our commit messages:

- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, etc)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing tests or correcting existing tests
- **chore**: Changes to the build process or auxiliary tools and libraries

Each commit message should be structured as follows:

```
<type>[optional scope]: <description>

[optional body]

[optional footer(s)]
```

Example:

```
feat(auth): implement JWT authentication

- Add JWT token generation
- Add token validation middleware
- Update user routes to use authentication

Closes #123
```

We have set up a commit message template and commitlint to help you follow this convention.

5. Push to your fork and create a Pull Request

Expand Down Expand Up @@ -161,9 +194,18 @@ This project and everyone participating in it is governed by our Code of Conduct

## Release Process

1. Maintainers will handle releases
2. Follow semantic versioning
3. Update changelog entries
4. Tag releases appropriately
1. Releases are automated through our CI/CD pipeline
2. When code is merged to the main branch, semantic-release:
- Determines the next version based on conventional commit messages
- Generates a changelog from commit messages
- Creates a GitHub Release with the changelog
- Tags the release
- Publishes to NPM
3. No manual release steps are required
4. Ensure your commit messages follow the conventional commits format to trigger appropriate version bumps:
- `feat:` commits trigger a minor version bump
- `fix:` commits trigger a patch version bump
- `perf:` commits trigger a patch version bump
- Commits with `BREAKING CHANGE:` in the footer trigger a major version bump

Thank you for contributing to MyCoder! 👍
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ MyCoder can be triggered directly from GitHub issue comments using the flexible
```

Examples:

- `/mycoder implement a PR for this issue`
- `/mycoder create an implementation plan`
- `/mycoder suggest test cases for this feature`
Expand Down Expand Up @@ -78,6 +79,21 @@ pnpm build
pnpm test
```

## Release Process

MyCoder follows the [Conventional Commits](https://www.conventionalcommits.org/) specification for commit messages. Our release process is fully automated:

1. Commit your changes following the conventional commits format
2. Create a PR and get it reviewed and approved
3. When merged to main, our CI/CD pipeline will:
- Determine the next version based on commit messages
- Generate a changelog
- Create a GitHub Release
- Tag the release
- Publish to NPM

For more details, see the [Contributing Guide](CONTRIBUTING.md).

## Contributing

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to this project.
Expand Down
9 changes: 9 additions & 0 deletions commit-message.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
feat(release): implement conventional commits approach

- Add commitlint to enforce conventional commit format
- Replace changesets with semantic-release
- Set up GitHub Actions workflow for automated releases
- Update documentation with new release process
- Add commit message template

Closes #140
9 changes: 9 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
extends: ['@commitlint/config-conventional'],
rules: {
// Optional custom rules
'body-max-line-length': [2, 'always', 100],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
},
};
5 changes: 4 additions & 1 deletion docs/github-comment-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ MyCoder will process your instructions in the context of the issue and respond a
```

MyCoder will:

1. Check out the repository
2. Review the issue details
3. Implement a solution according to the requirements
Expand All @@ -33,6 +34,7 @@ MyCoder will:
```

MyCoder will:

1. Review the issue details
2. Create a comprehensive implementation plan
3. Post the plan as a comment on the issue
Expand All @@ -58,6 +60,7 @@ The `/mycoder` command is flexible and can handle various requests:
This functionality is implemented as a GitHub Action that runs whenever a new comment is added to an issue. The action checks for the `/mycoder` command pattern and triggers MyCoder with the appropriate instructions.

MyCoder receives context about:

- The issue number
- The specific prompt you provided
- The comment URL where the command was triggered
Expand All @@ -77,4 +80,4 @@ For this feature to work in your repository:

- The action runs with GitHub's default timeout limits
- Complex implementations may require multiple iterations
- The AI model's capabilities determine the quality of the results
- The AI model's capabilities determine the quality of the results
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@
"clean:all": "pnpm -r clean:all && rimraf node_modules",
"cloc": "npx cloc * --exclude-dir=node_modules,dist,.vinxi,.output",
"gcloud-setup": "gcloud auth application-default login && gcloud config set account \"[email protected]\" && gcloud config set project drivecore-primary && gcloud config set run/region us-central1",
"changeset": "changeset",
"version": "changeset version",
"release": "changeset publish",
"cli": "cd packages/cli && node --no-deprecation bin/cli.js",
"prepare": "husky"
"prepare": "husky",
"semantic-release": "semantic-release",
"release": "semantic-release"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
Expand All @@ -36,7 +35,12 @@
},
"devDependencies": {
"@changesets/cli": "^2.28.1",
"@commitlint/cli": "^19.7.1",
"@commitlint/config-conventional": "^19.7.1",
"@eslint/js": "^9",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^11.0.1",
"@typescript-eslint/eslint-plugin": "^8.23.0",
"@typescript-eslint/parser": "^8.23.0",
"eslint": "^9.0.0",
Expand All @@ -49,6 +53,7 @@
"husky": "^9.1.7",
"lint-staged": "^15.4.3",
"prettier": "^3.5.1",
"semantic-release": "^24.2.3",
"typescript-eslint": "^8.23.0"
},
"pnpm": {
Expand Down
Loading
Loading