mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-12-10 18:42:31 -06:00
feat: improve contributor guidance
This commit is contained in:
parent
110bdfb219
commit
d045f32b85
11
.github/ISSUE_TEMPLATE/config.yml
vendored
11
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,11 +1,14 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Docs
|
||||
- name: 📚 Documentation
|
||||
url: https://docs.ombi.app/
|
||||
about: The Ombi documentation should help guide you through installation and setup as well as help resolve common problems and answer frequently asked questions
|
||||
- name: Discord support
|
||||
- name: 💬 Discord Community
|
||||
url: https://discord.gg/Sa7wNWb
|
||||
about: Ask questions about Ombi
|
||||
- name: Feature suggestions
|
||||
about: Ask questions about Ombi, get help with contributions, or chat with other users
|
||||
- name: ✨ Feature Suggestions
|
||||
url: https://ombifeatures.featureupvote.com
|
||||
about: Share your suggestions or ideas to make Ombi better!
|
||||
- name: 🤝 Contributing Guide
|
||||
url: https://github.com/ombi-app/Ombi/blob/develop/CONTRIBUTING.md
|
||||
about: Learn how to contribute to Ombi development
|
||||
|
||||
66
.github/ISSUE_TEMPLATE/contribution_help.yml
vendored
Normal file
66
.github/ISSUE_TEMPLATE/contribution_help.yml
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
name: "🤝 Contribution Help"
|
||||
description: 'Get help with contributing to Ombi'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
This template is for contributors who need help with the contribution process, development setup, or have questions about the codebase.
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Type of Help Needed
|
||||
options:
|
||||
- Development setup issues
|
||||
- Understanding the codebase
|
||||
- Testing guidance
|
||||
- Code review feedback
|
||||
- Git/GitHub workflow help
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Question or Issue
|
||||
description: Describe what you need help with in detail.
|
||||
placeholder: "I'm trying to..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: What I've Tried
|
||||
description: Describe what you've already tried or researched.
|
||||
placeholder: "I've already tried..."
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Error Messages
|
||||
description: If you're encountering errors, please paste them here.
|
||||
render: shell
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Ombi Version
|
||||
description: What version of Ombi are you working with?
|
||||
placeholder: "e.g., develop branch, v4.40.0"
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Development Environment
|
||||
options:
|
||||
- Windows
|
||||
- macOS
|
||||
- Linux
|
||||
- Docker
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Checklist
|
||||
options:
|
||||
- label: I have read the [Contributing Guide](CONTRIBUTING.md)
|
||||
- label: I have searched existing issues for similar questions
|
||||
- label: I have checked the [Discord community](https://discord.gg/Sa7wNWb) for help
|
||||
- label: I have reviewed the [documentation](https://docs.ombi.app/)
|
||||
66
.github/ISSUE_TEMPLATE/contributor_onboarding.yml
vendored
Normal file
66
.github/ISSUE_TEMPLATE/contributor_onboarding.yml
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
name: "🚀 Contributor Onboarding"
|
||||
description: 'Checklist for new contributors to get started'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Welcome to the Ombi contributor community! This checklist will help you get started with contributing to the project.
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "📋 Pre-Contribution Checklist"
|
||||
options:
|
||||
- label: I have read and understood the [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- label: I have read the [Contributing Guide](CONTRIBUTING.md)
|
||||
- label: I have set up my development environment
|
||||
- label: I have successfully built and run Ombi locally
|
||||
- label: I have run the test suite and all tests pass
|
||||
- label: I have joined the [Discord community](https://discord.gg/Sa7wNWb)
|
||||
- label: I have reviewed the [project documentation](https://docs.ombi.app/)
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "🎯 Contribution Goals"
|
||||
options:
|
||||
- label: I want to fix bugs
|
||||
- label: I want to add new features
|
||||
- label: I want to improve documentation
|
||||
- label: I want to help with testing
|
||||
- label: I want to help with code review
|
||||
- label: I want to help with community support
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Experience Level
|
||||
options:
|
||||
- Complete beginner
|
||||
- Some programming experience
|
||||
- Experienced developer
|
||||
- Expert in .NET/Angular
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Areas of Interest
|
||||
description: What parts of Ombi are you most interested in working on?
|
||||
placeholder: "e.g., UI/UX, backend APIs, database, integrations, etc."
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Questions or Concerns
|
||||
description: Any questions about the contribution process or concerns you'd like to address?
|
||||
placeholder: "I'm not sure about..."
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## 🎉 Next Steps
|
||||
|
||||
Once you've completed this checklist:
|
||||
1. Look for issues labeled "good first issue" or "help wanted"
|
||||
2. Start with small contributions to get familiar with the codebase
|
||||
3. Don't hesitate to ask questions in Discord or create a "Contribution Help" issue
|
||||
4. Remember: every contribution, no matter how small, is valuable!
|
||||
|
||||
**Welcome to the team! 🎉**
|
||||
55
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
55
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
name: "✨ Feature Request"
|
||||
description: 'Suggest a new feature for Ombi'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**Note:** Feature requests are primarily handled on [Feature Upvote](https://features.ombi.io).
|
||||
Please check if your feature has already been requested there before creating a GitHub issue.
|
||||
|
||||
If you're proposing a significant feature or architectural change, please use this template to discuss it with the maintainers first.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Feature Summary
|
||||
description: A clear and concise description of the feature you'd like to see implemented.
|
||||
placeholder: "I would like Ombi to..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Problem Description
|
||||
description: What problem does this feature solve? What is the current limitation?
|
||||
placeholder: "Currently, users have to..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Proposed Solution
|
||||
description: Describe your proposed solution in detail.
|
||||
placeholder: "I propose that Ombi should..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Alternative Solutions
|
||||
description: Describe any alternative solutions or workarounds you've considered.
|
||||
placeholder: "Alternative approaches could include..."
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Additional Context
|
||||
options:
|
||||
- label: I have searched existing issues and this hasn't been requested before
|
||||
- label: I have checked Feature Upvote and this hasn't been requested there
|
||||
- label: I am willing to contribute to the implementation of this feature
|
||||
- label: This feature would benefit a significant number of users
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Add any other context, mockups, or screenshots about the feature request here.
|
||||
render: markdown
|
||||
45
.github/pull_request_template.md
vendored
Normal file
45
.github/pull_request_template.md
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
## 📝 Description
|
||||
|
||||
<!-- Provide a brief description of the changes in this PR -->
|
||||
|
||||
## 🔗 Related Issues
|
||||
|
||||
<!-- Link to related issues using "Fixes #123" or "Closes #123" -->
|
||||
|
||||
## 🧪 Testing
|
||||
|
||||
<!-- Describe the tests you ran to verify your changes -->
|
||||
|
||||
- [ ] Unit tests pass
|
||||
- [ ] Integration tests pass
|
||||
- [ ] Manual testing completed
|
||||
- [ ] No breaking changes
|
||||
|
||||
## 📸 Screenshots (if applicable)
|
||||
|
||||
<!-- Add screenshots for UI changes -->
|
||||
|
||||
## 📋 Checklist
|
||||
|
||||
- [ ] My code follows the project's coding standards
|
||||
- [ ] I have mentioned if this is a vibe coded PR
|
||||
- [ ] I have performed a self-review of my code
|
||||
- [ ] I have commented my code, particularly in hard-to-understand areas
|
||||
- [ ] I have made corresponding changes to the documentation
|
||||
- [ ] My changes generate no new warnings
|
||||
- [ ] I have added tests that prove my fix is effective or that my feature works
|
||||
- [ ] New and existing unit tests pass locally with my changes
|
||||
- [ ] Any dependent changes have been merged and published
|
||||
|
||||
## 🎯 Type of Change
|
||||
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] Documentation update
|
||||
- [ ] Performance improvement
|
||||
- [ ] Code refactoring
|
||||
|
||||
## 📚 Additional Notes
|
||||
|
||||
<!-- Any additional information that reviewers should know -->
|
||||
102
.github/workflows/contributor-recognition.yml
vendored
Normal file
102
.github/workflows/contributor-recognition.yml
vendored
Normal file
@ -0,0 +1,102 @@
|
||||
name: Contributor Recognition
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
recognize-contributors:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.merged == true
|
||||
steps:
|
||||
- name: Get contributor info
|
||||
id: contributor
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const pr = context.payload.pull_request;
|
||||
const author = pr.user.login;
|
||||
const isFirstTime = pr.author_association === 'FIRST_TIME_CONTRIBUTOR';
|
||||
|
||||
return {
|
||||
author,
|
||||
isFirstTime,
|
||||
prNumber: pr.number,
|
||||
prTitle: pr.title,
|
||||
prUrl: pr.html_url
|
||||
};
|
||||
|
||||
- name: Comment on merged PR
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const contributor = ${{ toJson(steps.contributor.outputs) }};
|
||||
const isFirstTime = contributor.isFirstTime === 'true';
|
||||
|
||||
let message = `🎉 **Thank you for your contribution!**\n\n`;
|
||||
|
||||
if (isFirstTime) {
|
||||
message += `🎊 **Congratulations on your first merged PR!** Welcome to the Ombi contributor community!\n\n`;
|
||||
}
|
||||
|
||||
message += `Your changes have been successfully merged and will be included in the next release.\n\n`;
|
||||
message += `**What you contributed:**\n`;
|
||||
message += `- ${contributor.prTitle}\n`;
|
||||
message += `- [PR #${contributor.prNumber}](${contributor.prUrl})\n\n`;
|
||||
|
||||
if (isFirstTime) {
|
||||
message += `**Next steps:**\n`;
|
||||
message += `- Join our [Discord community](https://discord.gg/Sa7wNWb) to connect with other contributors\n`;
|
||||
message += `- Check out more [good first issues](https://github.com/ombi-app/Ombi/labels/good%20first%20issue) if you'd like to contribute more\n`;
|
||||
message += `- Your contribution will be automatically added to our contributors list in the README\n\n`;
|
||||
}
|
||||
|
||||
message += `Thank you for helping make Ombi better! 🙏`;
|
||||
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: message
|
||||
});
|
||||
|
||||
- name: Add contributor badge
|
||||
if: steps.contributor.outputs.isFirstTime == 'true'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
await github.rest.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
labels: ['first-contribution']
|
||||
});
|
||||
|
||||
# Weekly contributor summary
|
||||
weekly-summary:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
steps:
|
||||
- name: Get recent contributors
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { data: prs } = await github.rest.pulls.list({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'closed',
|
||||
sort: 'updated',
|
||||
direction: 'desc',
|
||||
per_page: 50
|
||||
});
|
||||
|
||||
const recentMergedPRs = prs.filter(pr =>
|
||||
pr.merged_at &&
|
||||
new Date(pr.merged_at) > new Date(Date.now() - 7 * 24 * 60 * 60 * 1000)
|
||||
);
|
||||
|
||||
const contributors = [...new Set(recentMergedPRs.map(pr => pr.user.login))];
|
||||
|
||||
console.log(`Recent contributors (last 7 days): ${contributors.join(', ')}`);
|
||||
console.log(`Total merged PRs: ${recentMergedPRs.length}`);
|
||||
73
.github/workflows/first-time-contributor.yml
vendored
Normal file
73
.github/workflows/first-time-contributor.yml
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
name: First Time Contributor Welcome
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
branches: [develop]
|
||||
|
||||
jobs:
|
||||
welcome:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
||||
steps:
|
||||
- name: Welcome first-time contributor
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { data: comments } = await github.rest.issues.listComments({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
});
|
||||
|
||||
// Check if welcome comment already exists
|
||||
const hasWelcomeComment = comments.some(comment =>
|
||||
comment.user.type === 'Bot' &&
|
||||
comment.body.includes('🎉 Welcome to Ombi!')
|
||||
);
|
||||
|
||||
if (!hasWelcomeComment) {
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `🎉 **Welcome to Ombi!**
|
||||
|
||||
Thank you for your first contribution! We're excited to have you join our community.
|
||||
|
||||
## 📚 Helpful Resources
|
||||
- [Contributing Guide](CONTRIBUTING.md) - Everything you need to know about contributing
|
||||
- [Discord Community](https://discord.gg/Sa7wNWb) - Get help and chat with other contributors
|
||||
- [Documentation](https://docs.ombi.app/) - Comprehensive project documentation
|
||||
|
||||
## 🚀 What Happens Next
|
||||
1. Our automated checks will run to validate your changes
|
||||
2. A maintainer will review your PR
|
||||
3. We'll provide feedback and guidance if needed
|
||||
4. Once approved, your contribution will be merged!
|
||||
|
||||
## 💡 Tips for Success
|
||||
- Keep your PR focused and small
|
||||
- Include tests for new functionality
|
||||
- Update documentation if needed
|
||||
- Be patient - we'll review as soon as possible
|
||||
|
||||
Thanks again for contributing to Ombi! 🙏`
|
||||
});
|
||||
}
|
||||
|
||||
# Add helpful labels for first-time contributors
|
||||
add-labels:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
||||
steps:
|
||||
- name: Add first-time contributor label
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
await github.rest.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
labels: ['first-time-contributor', 'needs-review']
|
||||
});
|
||||
111
.github/workflows/pr.yml
vendored
111
.github/workflows/pr.yml
vendored
@ -5,27 +5,26 @@ on:
|
||||
types: [opened, synchronize, reopened]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
issues: write
|
||||
repository-projects: write
|
||||
|
||||
jobs:
|
||||
build-ui:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: NodeModules Cache
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: node_modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: UI Install
|
||||
- name: Install UI dependencies
|
||||
run: yarn --cwd ./src/Ombi/ClientApp install
|
||||
|
||||
- name: Build UI
|
||||
@ -40,7 +39,7 @@ jobs:
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Nuget Cache
|
||||
- name: Cache NuGet packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
@ -48,59 +47,48 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nuget
|
||||
|
||||
- name: Run Unit Tests
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
cd src
|
||||
dotnet test --configuration "Release" --logger "trx;LogFileName=test-results.trx"
|
||||
dotnet test --configuration "Release" --logger "trx;LogFileName=test-results.trx" --results-directory "TestResults"
|
||||
|
||||
analysis:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
# Disabling shallow clone is recommended for improving relevancy of reporting
|
||||
fetch-depth: 0
|
||||
- name: SonarCloud Scan
|
||||
uses: sonarsource/sonarcloud-github-action@master
|
||||
with:
|
||||
args: >
|
||||
-Dsonar.organization=ombi-app
|
||||
-Dsonar.projectKey=Ombi-app_Ombi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
- name: Publish test results
|
||||
uses: dorny/test-reporter@v1
|
||||
if: always()
|
||||
with:
|
||||
name: Unit Test Results
|
||||
path: '**/test-results.trx'
|
||||
reporter: dotnet-trx
|
||||
|
||||
publish:
|
||||
# Build and test backend for multiple platforms
|
||||
build-backend:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ unit-test ]
|
||||
needs: [unit-test]
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: win-x64
|
||||
format: zip
|
||||
compression: zip
|
||||
- os: win-x86
|
||||
format: zip
|
||||
compression: zip
|
||||
- os: linux-x64
|
||||
format: tar.gz
|
||||
compression: tar
|
||||
- os: linux-arm
|
||||
format: tar.gz
|
||||
compression: tar
|
||||
- os: linux-arm64
|
||||
compression: tar
|
||||
format: tar.gz
|
||||
- os: osx-x64
|
||||
compression: tar
|
||||
format: tar.gz
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-dotnet@v1
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Nuget Cache
|
||||
- name: Cache NuGet packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
@ -108,9 +96,52 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nuget
|
||||
|
||||
- name: Publish Backend ${{ matrix.os }}
|
||||
- name: Build backend for ${{ matrix.os }}
|
||||
run: dotnet publish -c Release -r ${{ matrix.os }} -o "${{ matrix.os }}" --self-contained true -p:PublishSingleFile=true
|
||||
working-directory: src/Ombi
|
||||
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: backend-${{ matrix.os }}-${{ github.sha }}
|
||||
path: ./${{ matrix.os }}
|
||||
retention-days: 1
|
||||
|
||||
# PR status check
|
||||
pr-status:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-ui, unit-test, build-backend]
|
||||
if: always()
|
||||
steps:
|
||||
- name: Check all jobs status
|
||||
run: |
|
||||
if [[ "${{ needs.build-ui.result }}" == "failure" || "${{ needs.unit-test.result }}" == "failure" || "${{ needs.build-backend.result }}" == "failure" ]]; then
|
||||
echo "❌ Some checks failed"
|
||||
exit 1
|
||||
else
|
||||
echo "✅ All checks passed"
|
||||
fi
|
||||
|
||||
# Comment on PR with build status
|
||||
pr-comment:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [pr-status]
|
||||
if: always() && github.event_name == 'pull_request'
|
||||
steps:
|
||||
- name: Comment PR
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const status = '${{ needs.pr-status.result }}';
|
||||
const emoji = status === 'success' ? '✅' : '❌';
|
||||
const message = status === 'success'
|
||||
? 'All checks passed! Your PR is ready for review.'
|
||||
: 'Some checks failed. Please review the logs and fix any issues.';
|
||||
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `${emoji} **PR Build Status**\n\n${message}\n\n[View workflow run](${context.payload.pull_request.html_url}/checks)`
|
||||
});
|
||||
167
CONTRIBUTING.md
Normal file
167
CONTRIBUTING.md
Normal file
@ -0,0 +1,167 @@
|
||||
# Contributing to Ombi
|
||||
|
||||
Thank you for your interest in contributing to Ombi! This document provides guidelines and information for contributors.
|
||||
|
||||
## 🚀 Getting Started
|
||||
|
||||
### Prerequisites
|
||||
- [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
|
||||
- [Node.js 20+](https://nodejs.org/)
|
||||
- [Yarn](https://yarnpkg.com/)
|
||||
- [Git](https://git-scm.com/)
|
||||
|
||||
### Development Setup
|
||||
|
||||
1. **Fork and clone the repository**
|
||||
```bash
|
||||
git clone https://github.com/YOUR_USERNAME/Ombi.git
|
||||
cd Ombi
|
||||
```
|
||||
|
||||
2. **Install dependencies**
|
||||
```bash
|
||||
# Install backend dependencies
|
||||
dotnet restore
|
||||
|
||||
# Install frontend dependencies
|
||||
yarn --cwd ./src/Ombi/ClientApp install
|
||||
```
|
||||
|
||||
3. **Run the application**
|
||||
```bash
|
||||
# Start the backend
|
||||
dotnet run --project src/Ombi
|
||||
|
||||
# In another terminal, start the frontend
|
||||
yarn --cwd ./src/Ombi/ClientApp start
|
||||
```
|
||||
|
||||
4. **Run tests**
|
||||
```bash
|
||||
dotnet test
|
||||
```
|
||||
|
||||
## 📝 How to Contribute
|
||||
|
||||
### Reporting Issues
|
||||
- Use the [bug report template](.github/ISSUE_TEMPLATE/bug_report.yml)
|
||||
- Search existing issues before creating new ones
|
||||
- Provide clear reproduction steps and logs
|
||||
|
||||
### Suggesting Features
|
||||
- Feature requests are handled on [Feature Upvote](https://features.ombi.io)
|
||||
- Search existing requests before creating new ones
|
||||
- Vote on existing requests if similar to your idea
|
||||
|
||||
### Code Contributions
|
||||
|
||||
1. **Create a feature branch**
|
||||
```bash
|
||||
git checkout -b feature/your-feature-name
|
||||
```
|
||||
|
||||
2. **Make your changes**
|
||||
- Follow the coding standards (see below)
|
||||
- Write tests for new functionality
|
||||
- Update documentation if needed
|
||||
|
||||
3. **Test your changes**
|
||||
```bash
|
||||
# Run all tests
|
||||
dotnet test
|
||||
yarn --cwd ./src/Ombi/ClientApp test
|
||||
|
||||
# Run linting
|
||||
yarn --cwd ./src/Ombi/ClientApp lint
|
||||
```
|
||||
|
||||
4. **Commit your changes**
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "feat: add your feature description"
|
||||
```
|
||||
|
||||
5. **Push and create a Pull Request**
|
||||
```bash
|
||||
git push origin feature/your-feature-name
|
||||
```
|
||||
|
||||
## 🎯 Coding Standards
|
||||
|
||||
### Backend (.NET)
|
||||
- Follow C# naming conventions
|
||||
- Use meaningful variable and method names
|
||||
- Add XML documentation for public APIs
|
||||
- Write unit tests for new functionality
|
||||
- Use `async/await` for I/O operations
|
||||
|
||||
### Frontend (Angular)
|
||||
- Follow Angular best practices
|
||||
- Use standalone components
|
||||
- Prefer signals over observables for state management
|
||||
- Use `OnPush` change detection strategy
|
||||
- Write component tests
|
||||
|
||||
### General
|
||||
- Keep functions small and focused
|
||||
- Use meaningful commit messages
|
||||
- Follow the existing code style
|
||||
- Add comments for complex logic
|
||||
|
||||
## 🧪 Testing
|
||||
|
||||
### Running Tests
|
||||
```bash
|
||||
# Backend unit tests
|
||||
dotnet test
|
||||
|
||||
# Frontend unit tests
|
||||
yarn --cwd ./src/Ombi/ClientApp test
|
||||
|
||||
# E2E tests
|
||||
yarn --cwd ./tests cypress:run
|
||||
```
|
||||
|
||||
### Test Requirements
|
||||
- New features must include tests
|
||||
- Bug fixes should include regression tests
|
||||
- Aim for good test coverage
|
||||
- Tests should be fast and reliable
|
||||
|
||||
## 📋 Pull Request Process
|
||||
|
||||
1. **Before submitting**
|
||||
- Ensure all tests pass
|
||||
- Update documentation if needed
|
||||
- Rebase on latest develop branch
|
||||
- Squash commits if necessary
|
||||
|
||||
2. **PR Requirements**
|
||||
- Clear description of changes
|
||||
- Reference related issues
|
||||
- Include screenshots for UI changes
|
||||
- Ensure CI passes
|
||||
|
||||
3. **Review Process**
|
||||
- Maintainers will review your PR
|
||||
- Address feedback promptly
|
||||
- Be open to suggestions
|
||||
- Keep PRs focused and small
|
||||
|
||||
## ❓ Getting Help
|
||||
|
||||
- [Discord Community](https://discord.gg/Sa7wNWb)
|
||||
- [Documentation](https://docs.ombi.app/)
|
||||
- [FAQ](https://docs.ombi.app/info/faq/)
|
||||
|
||||
## 📜 Code of Conduct
|
||||
|
||||
Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md).
|
||||
|
||||
## 🙏 Recognition
|
||||
|
||||
Contributors are automatically recognized in our README. Thank you for contributing!
|
||||
|
||||
---
|
||||
|
||||
**Happy coding! 🎉**
|
||||
138
scripts/setup-dev.sh
Executable file
138
scripts/setup-dev.sh
Executable file
@ -0,0 +1,138 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ombi Development Setup Script
|
||||
# This script helps new contributors set up their development environment
|
||||
|
||||
set -e
|
||||
|
||||
echo "🚀 Setting up Ombi development environment..."
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Function to print colored output
|
||||
print_status() {
|
||||
echo -e "${BLUE}[INFO]${NC} $1"
|
||||
}
|
||||
|
||||
print_success() {
|
||||
echo -e "${GREEN}[SUCCESS]${NC} $1"
|
||||
}
|
||||
|
||||
print_warning() {
|
||||
echo -e "${YELLOW}[WARNING]${NC} $1"
|
||||
}
|
||||
|
||||
print_error() {
|
||||
echo -e "${RED}[ERROR]${NC} $1"
|
||||
}
|
||||
|
||||
# Check if we're in the right directory
|
||||
if [ ! -f "src/Ombi/Ombi.csproj" ]; then
|
||||
print_error "Please run this script from the Ombi root directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for required tools
|
||||
print_status "Checking for required tools..."
|
||||
|
||||
# Check .NET
|
||||
if ! command -v dotnet &> /dev/null; then
|
||||
print_error ".NET 8.0 SDK is required but not installed"
|
||||
print_status "Please install from: https://dotnet.microsoft.com/download/dotnet/8.0"
|
||||
exit 1
|
||||
else
|
||||
DOTNET_VERSION=$(dotnet --version)
|
||||
print_success "Found .NET version: $DOTNET_VERSION"
|
||||
fi
|
||||
|
||||
# Check Node.js
|
||||
if ! command -v node &> /dev/null; then
|
||||
print_error "Node.js is required but not installed"
|
||||
print_status "Please install from: https://nodejs.org/"
|
||||
exit 1
|
||||
else
|
||||
NODE_VERSION=$(node --version)
|
||||
print_success "Found Node.js version: $NODE_VERSION"
|
||||
fi
|
||||
|
||||
# Check Yarn
|
||||
if ! command -v yarn &> /dev/null; then
|
||||
print_error "Yarn is required but not installed"
|
||||
print_status "Please install from: https://yarnpkg.com/"
|
||||
exit 1
|
||||
else
|
||||
YARN_VERSION=$(yarn --version)
|
||||
print_success "Found Yarn version: $YARN_VERSION"
|
||||
fi
|
||||
|
||||
# Check Git
|
||||
if ! command -v git &> /dev/null; then
|
||||
print_error "Git is required but not installed"
|
||||
exit 1
|
||||
else
|
||||
print_success "Found Git"
|
||||
fi
|
||||
|
||||
print_status "All required tools are installed!"
|
||||
|
||||
# Restore .NET dependencies
|
||||
print_status "Restoring .NET dependencies..."
|
||||
if dotnet restore; then
|
||||
print_success ".NET dependencies restored"
|
||||
else
|
||||
print_error "Failed to restore .NET dependencies"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install frontend dependencies
|
||||
print_status "Installing frontend dependencies..."
|
||||
if yarn --cwd ./src/Ombi/ClientApp install; then
|
||||
print_success "Frontend dependencies installed"
|
||||
else
|
||||
print_error "Failed to install frontend dependencies"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Build the project
|
||||
print_status "Building the project..."
|
||||
if dotnet build; then
|
||||
print_success "Project built successfully"
|
||||
else
|
||||
print_error "Failed to build project"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run tests
|
||||
print_status "Running tests..."
|
||||
if dotnet test; then
|
||||
print_success "All tests passed"
|
||||
else
|
||||
print_warning "Some tests failed - this might be expected for a fresh setup"
|
||||
fi
|
||||
|
||||
# Create development configuration
|
||||
print_status "Setting up development configuration..."
|
||||
if [ ! -f "src/Ombi/appsettings.Development.json" ]; then
|
||||
print_warning "Development configuration not found - you may need to create one"
|
||||
fi
|
||||
|
||||
print_success "Development environment setup complete!"
|
||||
echo ""
|
||||
echo "🎉 You're ready to start contributing to Ombi!"
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo "1. Read the CONTRIBUTING.md guide"
|
||||
echo "2. Join our Discord: https://discord.gg/Sa7wNWb"
|
||||
echo "3. Look for 'good first issue' labels"
|
||||
echo "4. Start coding!"
|
||||
echo ""
|
||||
echo "To run the application:"
|
||||
echo " Backend: dotnet run --project src/Ombi"
|
||||
echo " Frontend: yarn --cwd ./src/Ombi/ClientApp start"
|
||||
echo ""
|
||||
echo "Happy coding! 🚀"
|
||||
Loading…
x
Reference in New Issue
Block a user