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
21 changes: 21 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# CODEOWNERS file
# This file defines individuals or teams that are responsible for code in this repository.
# These individuals are automatically requested for review when someone opens a pull request.

# Default owners for everything in the repo
* @OneM1

# Backend code
/app/ @OneM1
/alembic/ @OneM1

# Frontend code
/frontend/ @OneM1

# Configuration files
*.yml @OneM1
*.yaml @OneM1
requirements.txt @OneM1

# Documentation
*.md @OneM1
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug Report
about: Create a report to help us improve
title: '[BUG] '
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**
- OS: [e.g. Windows, macOS, Linux]
- Python Version: [e.g. 3.9]
- Browser: [e.g. chrome, safari]
- Version: [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature Request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
49 changes: 49 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## Description
<!-- Provide a brief description of the changes in this pull request -->

## Type of Change
<!-- Mark the relevant option with an 'x' -->

- [ ] 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
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test addition or improvement

## Changes Made
<!-- List the specific changes made in this PR -->

-
-
-

## Testing
<!-- Describe the tests you ran to verify your changes -->

- [ ] I have tested this code locally
- [ ] All existing tests pass
- [ ] I have added new tests (if applicable)

## Checklist
<!-- Mark completed items with an 'x' -->

- [ ] My code follows the style guidelines 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
- [ ] My changes generate no new warnings
- [ ] I have checked that this PR does not introduce security vulnerabilities
- [ ] Any dependent changes have been merged and published

## Related Issues
<!-- Link to any related issues using #issue_number -->

Closes #

## Screenshots (if applicable)
<!-- Add screenshots to help explain your changes -->

## Additional Notes
<!-- Add any other context about the pull request here -->
61 changes: 61 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Repository settings for branch protection
# This file can be used with the Probot Settings app or GitHub's repository settings API
# See: https://github.com/probot/settings

repository:
# Repository description
description: A full-stack blog application with FastAPI backend and Vue.js frontend

# Repository homepage
homepage: https://github.com/OneM1/Fastapi

# Repository topics
topics: fastapi, vuejs, blog, postgresql, jwt-authentication

# Repository features
has_issues: true
has_projects: true
has_wiki: true
has_downloads: true

# Default branch
default_branch: main

# Branch protection rules
branches:
- name: main
# Protection settings
protection:
# Require pull request reviews before merging
required_pull_request_reviews:
# Require approving reviews
required_approving_review_count: 1
# Dismiss stale pull request approvals when new commits are pushed
dismiss_stale_reviews: true
# Require review from Code Owners
require_code_owner_reviews: false
# Allow specified users to bypass pull request requirements
dismissal_restrictions: {}

# Require status checks to pass before merging
required_status_checks:
# Require branches to be up to date before merging
strict: true
# Status checks that are required
contexts:
- "build"

# Enforce restrictions for administrators
enforce_admins: false

# Prevent force pushes
allow_force_pushes: false

# Prevent branch deletion
allow_deletions: false

# Require linear history
required_linear_history: false

# Require conversation resolution before merging
required_conversation_resolution: true
54 changes: 54 additions & 0 deletions .github/workflows/branch-protection-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Branch Protection Check

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

# Set explicit permissions for GITHUB_TOKEN to follow principle of least privilege
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Lint with flake8
run: |
pip install flake8
# Stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=env,venv,.venv,alembic,frontend
# Warn about other style issues but don't fail the build
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=env,venv,.venv,alembic,frontend

- name: Run basic tests
run: |
# Run any existing tests
if [ -f "test.py" ]; then
echo "Running basic tests..."
python test.py
else
echo "No test.py found, skipping tests"
fi

- name: Check branch protection status
run: |
echo "✅ Branch protection check completed"
echo "This workflow ensures code quality before merging to main"
Loading
Loading