-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add contributing guidelines and PR title format guide #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
3
commits into
main
Choose a base branch
from
copilot/sub-pr-4-one-more-time
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+176
−0
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # PR Title Quick Reference | ||
|
|
||
| ## Conventional Commits Format | ||
|
|
||
| All PR titles should follow the [Conventional Commits](https://www.conventionalcommits.org/) format: | ||
|
|
||
| **Format**: `<type>(<scope>): <description>` | ||
|
|
||
| ### Types and Examples | ||
|
|
||
| | Type | When to Use | Example | | ||
| |------|-------------|---------| | ||
| | `feat` | New feature | `feat(agent): add autonomous reply functionality` | | ||
| | `fix` | Bug fix | `fix(xapi): correct mention polling interval` | | ||
| | `docs` | Documentation only | `docs: update README.md and simplify xAI instructions` | | ||
| | `refactor` | Code restructuring | `refactor(grok): simplify AI decision logic` | | ||
| | `chore` | Maintenance | `chore: update dependencies to latest versions` | | ||
| | `ci` | CI/CD changes | `ci: add PR validation workflow` | | ||
| | `style` | Formatting changes | `style: fix indentation in config files` | | ||
| | `test` | Test updates | `test: add unit tests for agent service` | | ||
| | `perf` | Performance improvements | `perf(xapi): optimize mention polling` | | ||
|
|
||
| ### How to Update PR Title | ||
|
|
||
| 1. Go to your PR page on GitHub | ||
| 2. Click the "Edit" button next to the PR title | ||
| 3. Update the title to follow the format above | ||
| 4. Save changes | ||
|
|
||
| The PR validation workflow will then pass with no warnings. | ||
|
|
||
| ## Common Scenarios | ||
|
|
||
| ### Documentation Updates | ||
| **Problem**: PR title like "updates to the `README.md`" | ||
| **Solution**: `docs: update README.md and simplify xAI instructions` | ||
|
|
||
| ### Multiple File Changes | ||
| **Problem**: PR title like "various fixes" | ||
| **Solution**: Choose the primary change type: | ||
| - `fix: resolve polling and authentication issues` | ||
| - `refactor: restructure API client and services` | ||
|
|
||
| ### Feature Additions | ||
| **Problem**: PR title like "new stuff" | ||
| **Solution**: `feat(agent): implement autonomous decision-making` | ||
|
|
||
| ## Full Guidelines | ||
|
|
||
| For comprehensive contribution guidelines, see [CONTRIBUTING.md](/CONTRIBUTING.md). | ||
|
|
||
| --- | ||
|
|
||
| **Note**: The PR validation workflow treats conventional commits format as a **warning** (not an error), so PRs will not be blocked. However, following this format improves project maintainability and changelog generation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| ## Description | ||
|
|
||
| <!-- Provide a clear description of what this PR does --> | ||
|
|
||
| ## Motivation | ||
|
|
||
| <!-- Explain why this change is needed --> | ||
|
|
||
| ## Changes | ||
|
|
||
| <!-- List the main changes made in this PR --> | ||
| - | ||
| - | ||
| - | ||
|
|
||
| ## Related Issues | ||
|
|
||
| <!-- Link related issues using #issue-number --> | ||
| Closes # | ||
|
|
||
| ## Testing | ||
|
|
||
| <!-- Describe how you tested these changes --> | ||
| - [ ] Builds successfully (`npm run build`) | ||
| - [ ] Tested in simulation mode | ||
| - [ ] Tested with real API calls (if applicable) | ||
|
|
||
| ## Checklist | ||
|
|
||
| - [ ] PR title follows [conventional commits format](/CONTRIBUTING.md#pr-title-format) (e.g., `feat:`, `fix:`, `docs:`) | ||
| - [ ] PR description is clear and complete | ||
| - [ ] Code follows project style guidelines | ||
| - [ ] Changes are focused and reasonably sized | ||
| - [ ] Documentation updated (if needed) | ||
| - [ ] No sensitive information (API keys, tokens) committed | ||
|
|
||
| ## Screenshots / Logs (if applicable) | ||
|
|
||
| <!-- Add screenshots or relevant log output --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Contributing to MyXstack | ||
|
|
||
| Thank you for contributing to MyXstack! This guide will help you understand our contribution process and conventions. | ||
|
|
||
| ## Pull Request Guidelines | ||
|
|
||
| ### PR Title Format | ||
|
|
||
| We follow the [Conventional Commits](https://www.conventionalcommits.org/) format for PR titles. This helps us automatically generate changelogs and understand the nature of changes at a glance. | ||
|
|
||
| **Format**: `<type>(<scope>): <description>` | ||
|
|
||
| **Types**: | ||
| - `feat`: A new feature | ||
| - `fix`: A bug fix | ||
| - `docs`: Documentation changes only | ||
| - `style`: Code style changes (formatting, semicolons, etc.) that don't affect functionality | ||
| - `refactor`: Code changes that neither fix bugs nor add features | ||
| - `perf`: Performance improvements | ||
| - `test`: Adding or updating tests | ||
| - `chore`: Maintenance tasks, dependency updates | ||
| - `ci`: Changes to CI/CD configuration | ||
| - `build`: Changes to build system or dependencies | ||
| - `revert`: Reverting a previous commit | ||
|
|
||
| **Scope** (optional): The area of the codebase affected (e.g., `agent`, `xapi`, `grok`, `mcp`) | ||
|
|
||
| **Examples**: | ||
| - `docs: update README.md and simplify xAI instructions` | ||
| - `feat(agent): add autonomous reply functionality` | ||
| - `fix(xapi): correct mention polling interval` | ||
| - `chore: update dependencies to latest versions` | ||
| - `ci: add PR validation workflow` | ||
|
|
||
| ### PR Description | ||
|
|
||
| - Provide a clear description of what the PR does (minimum 20 characters) | ||
| - Reference related issues using `#issue-number` | ||
| - Explain the motivation for the change | ||
| - List any breaking changes | ||
| - Include testing steps if applicable | ||
|
|
||
| ### PR Size | ||
|
|
||
| - Try to keep PRs focused and under 500 lines of changes | ||
| - Large PRs (>500 lines) will trigger a warning | ||
| - Consider breaking large changes into smaller, reviewable chunks | ||
| - If a large PR is unavoidable, provide extra context in the description | ||
|
|
||
| ## Code Style | ||
|
|
||
| Follow the guidelines in `.github/copilot-instructions.md`: | ||
| - Use TypeScript strict mode | ||
| - Prefer async/await over raw promises | ||
| - Always wrap API calls in try-catch blocks | ||
| - Use explicit types; avoid `any` | ||
| - Follow naming conventions: | ||
| - Classes: PascalCase (e.g., `XAPIClient`) | ||
| - Functions: camelCase (e.g., `fetchMentions`) | ||
| - Constants: UPPER_SNAKE_CASE (e.g., `DEFAULT_POLLING_INTERVAL`) | ||
|
|
||
| ## Testing | ||
|
|
||
| - Run `npm run build` to verify TypeScript compilation | ||
| - Test changes in simulation mode when possible | ||
| - Ensure existing tests pass before submitting | ||
|
|
||
| ## Questions? | ||
|
|
||
| If you have questions, feel free to: | ||
| - Open an issue for discussion | ||
| - Ask in your PR comments | ||
| - Check the existing documentation in `ARCHITECTURE.md` or `USAGE.md` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The links in README.md use relative paths (e.g.,
CONTRIBUTING.md,.github/PR_TITLE_GUIDE.md), but files in.github/(pull_request_template.md and PR_TITLE_GUIDE.md) use absolute paths starting with/(e.g.,/CONTRIBUTING.md). For consistency and reliable rendering across GitHub's web interface, consider using absolute paths in README.md as well:[CONTRIBUTING.md](/CONTRIBUTING.md)[.github/PR_TITLE_GUIDE.md](/.github/PR_TITLE_GUIDE.md)This ensures the links work correctly whether viewed from the repository root or from within subdirectories in GitHub's web interface.