Skip to content
Open
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
262 changes: 131 additions & 131 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,138 +8,138 @@ language: en
early_access: true

chat:
# CodeRabbit will automatically respond to @coderabbitai mentions in PR comments
auto_reply: true
# CodeRabbit will automatically respond to @coderabbitai mentions in PR comments
auto_reply: true

issue_enrichment:
labeling:
auto_apply_labels: true
labeling_instructions:
- label: bug
instructions: Issues reporting bugs, errors, crashes, incorrect behavior, or unexpected results.
- label: enhancement
instructions: Feature requests, improvements to existing functionality, performance optimizations, refactoring suggestions, UI/UX enhancements.
- label: documentation
instructions: Documentation updates, additions, corrections, or clarifications needed.
planning:
enabled: true
auto_planning:
enabled: true
labels:
- 'plan-me'
- 'feature'
- '!no-plan'
labeling:
auto_apply_labels: true
labeling_instructions:
- label: bug
instructions: Issues reporting bugs, errors, crashes, incorrect behavior, or unexpected results.
- label: enhancement
instructions: Feature requests, improvements to existing functionality, performance optimizations, refactoring suggestions, UI/UX enhancements.
- label: documentation
instructions: Documentation updates, additions, corrections, or clarifications needed.
planning:
enabled: true
auto_planning:
enabled: true
labels:
- "plan-me"
- "feature"
- "!no-plan"

reviews:
profile: chill # Options: chill, assertive

auto_review:
enabled: true
ignore_title_keywords:
- 'WIP'
drafts: false
base_branches:
- develop

high_level_summary: true
sequence_diagrams: true
poem: true
review_status: true
collapse_walkthrough: false
changed_files_summary: true
request_changes_workflow: true

pre_merge_checks:
description:
mode: warning
docstrings:
mode: off

path_filters:
- '!**/node_modules/**'
- '!**/dist/**'
- '!**/build/**'
- '!**/__pycache__/**'
- '!**/.venv/**'

tools:
ruff:
enabled: true
markdownlint:
enabled: true
github-checks:
enabled: true
timeout_ms: 90000
eslint:
enabled: true
biome:
enabled: true
yamllint:
enabled: true
gitleaks:
enabled: true
clippy:
enabled: true

labeling_instructions:
- label: Python
instructions: Apply when the PR/MR contains changes to python source-code
- label: TypeScript/JavaScript
instructions: Apply when the PR/MR contains changes to javascript or typescript source-code
- label: Rust
instructions: Apply when the PR/MR contains changes to Rust source-code (Tauri backend)
- label: Documentation
instructions: Apply whenever project documentation is updated by the PR/MR
- label: Linter
instructions: Apply when the purpose of the PR/MR is related to fixing the feedback from a linter

path_instructions:
# Catch-all general instructions that apply to all files
- path: '**/*'
instructions: |
- Verify that documentation and comments are free of spelling mistakes
- Ensure that test code is automated, comprehensive, and follows testing best practices
- Verify that all critical functionality is covered by tests
- Confirm that the code meets the project's requirements and objectives
- Point out redundant obvious comments that do not add clarity to the code
- Look for code duplication
- Suggest code completions when seeing a TODO or FIXME comment

# TypeScript/JavaScript/React files (Vite Frontend)
- path: '**/*.{ts,tsx,js,jsx}'
instructions: |
TypeScript & React:
- Avoid 'any', use explicit types.
- The code adheres to best practices associated with React and Vite.
- Ensure responsive design principles are followed.
- Check for proper React hook dependencies and prevent unnecessary re-renders.

# Rust files (Tauri Backend)
- path: '**/src-tauri/**/*.rs'
instructions: |
Rust (Tauri):
- Ensure idiomatic Rust code is written.
- Watch out for unnecessary clone() calls or inefficient memory usage.
- Ensure errors are handled properly using Result rather than unwrap() or expect().
- Ensure Tauri commands are safely exposed to the frontend.

# Python files (Backend Microservices)
- path: '**/*.py'
instructions: |
Python:
- Check for PEP 8 violations and Python best practices.
- Check for performance considerations in asynchronous code.
- Ensure proper use of type hints.

# CSS/SCSS files
- path: '**/*.{css,scss}'
instructions: |
CSS & Styling:
- The code adheres to best practices associated with CSS.
- Look for responsive design issues.

# Asset files
- path: '**/assets/**/*'
instructions: |
Assets:
- Check image optimization and proper formats (WebP, SVG).
profile: chill # Options: chill, assertive

auto_review:
enabled: true
ignore_title_keywords:
- "WIP"
drafts: false
base_branches:
- develop

high_level_summary: true
sequence_diagrams: true
poem: true
review_status: true
collapse_walkthrough: false
changed_files_summary: true
request_changes_workflow: true

pre_merge_checks:
description:
mode: warning
docstrings:
mode: off

path_filters:
- "!**/node_modules/**"
- "!**/dist/**"
- "!**/build/**"
- "!**/__pycache__/**"
- "!**/.venv/**"

tools:
ruff:
enabled: true
markdownlint:
enabled: true
github-checks:
enabled: true
timeout_ms: 90000
eslint:
enabled: true
biome:
enabled: true
yamllint:
enabled: true
gitleaks:
enabled: true
clippy:
enabled: true

labeling_instructions:
- label: Python
instructions: Apply when the PR/MR contains changes to python source-code
- label: TypeScript/JavaScript
instructions: Apply when the PR/MR contains changes to javascript or typescript source-code
- label: Rust
instructions: Apply when the PR/MR contains changes to Rust source-code (Tauri backend)
- label: Documentation
instructions: Apply whenever project documentation is updated by the PR/MR
- label: Linter
instructions: Apply when the purpose of the PR/MR is related to fixing the feedback from a linter

path_instructions:
# Catch-all general instructions that apply to all files
- path: "**/*"
instructions: |
- Verify that documentation and comments are free of spelling mistakes
- Ensure that test code is automated, comprehensive, and follows testing best practices
- Verify that all critical functionality is covered by tests
- Confirm that the code meets the project's requirements and objectives
- Point out redundant obvious comments that do not add clarity to the code
- Look for code duplication
- Suggest code completions when seeing a TODO or FIXME comment

# TypeScript/JavaScript/React files (Vite Frontend)
- path: "**/*.{ts,tsx,js,jsx}"
instructions: |
TypeScript & React:
- Avoid 'any', use explicit types.
- The code adheres to best practices associated with React and Vite.
- Ensure responsive design principles are followed.
- Check for proper React hook dependencies and prevent unnecessary re-renders.

# Rust files (Tauri Backend)
- path: "**/src-tauri/**/*.rs"
instructions: |
Rust (Tauri):
- Ensure idiomatic Rust code is written.
- Watch out for unnecessary clone() calls or inefficient memory usage.
- Ensure errors are handled properly using Result rather than unwrap() or expect().
- Ensure Tauri commands are safely exposed to the frontend.

# Python files (Backend Microservices)
- path: "**/*.py"
instructions: |
Python:
- Check for PEP 8 violations and Python best practices.
- Check for performance considerations in asynchronous code.
- Ensure proper use of type hints.

# CSS/SCSS files
- path: "**/*.{css,scss}"
instructions: |
CSS & Styling:
- The code adheres to best practices associated with CSS.
- Look for responsive design issues.

# Asset files
- path: "**/assets/**/*"
instructions: |
Assets:
- Check image optimization and proper formats (WebP, SVG).
8 changes: 4 additions & 4 deletions .github/.markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"config": {
"MD013": false,
"MD024": {
"siblings_only": true
}
"siblings_only": true,
},
},
"globs": [
"**/*.md",
"!**/node_modules/**",
"!**/target/**",
"!**/venv/**",
"!**/.venv/**",
"!LICENSE.md"
]
"!LICENSE.md",
],
}
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ body:
- label: "I agree to follow this project's Code of Conduct"
required: true
- label: "I want to work on this issue"

30 changes: 14 additions & 16 deletions .github/workflows/aur-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
# schedule:
# - cron: '0 0 * * *'
workflow_dispatch:
permissions:

permissions:
contents: write

jobs:
Expand All @@ -13,7 +14,6 @@ jobs:
outputs:
need_update: ${{ steps.check_version.outputs.need_update }}
latest_version: ${{ steps.check_version.outputs.latest_version }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -27,42 +27,40 @@ jobs:
id: check_version
run: |
cd publishing

LATEST_VERSION=$(curl -fsSL https://api.github.com/repos/AOSSIE-Org/PictoPy/releases/latest \
| grep -oP '(?<="tag_name": "v)[^"]+')
| grep -oP '(?<="tag_name": ")[^"]+')
echo "Latest version: $LATEST_VERSION"

CURRENT_VERSION=$(grep -oP '(?<=pkgver=)[0-9.]+' PKGBUILD)
echo "Current version: $CURRENT_VERSION"

if [ "$LATEST_VERSION" != "$CURRENT_VERSION" ]; then
echo "need_update=true" >> "$GITHUB_OUTPUT"
else
echo "need_update=false" >> "$GITHUB_OUTPUT"
fi

echo "latest_version=$LATEST_VERSION" >> "$GITHUB_OUTPUT"

- name: Compute sha256 of new deb
if: steps.check_version.outputs.need_update == 'true'
id: sha
run: |
VERSION=${{ steps.check_version.outputs.latest_version }}
DEB_URL="https://github.com/AOSSIE-Org/PictoPy/releases/download/v${VERSION}/PictoPy_${VERSION}_amd64.deb"
VERSION="${{ steps.check_version.outputs.latest_version }}"
DEB_URL="https://github.com/AOSSIE-Org/PictoPy/releases/download/${VERSION}/PictoPy_${VERSION}_amd64.deb"
SHA=$(curl -fsSL "$DEB_URL" | sha256sum | cut -d' ' -f1)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
if ! echo "$SHA" | grep -qP '^[a-f0-9]{64}$'; then
echo "ERROR: Invalid SHA256 — deb download may have failed"
exit 1
fi
echo "sha=$SHA" >> "$GITHUB_OUTPUT"

- name: Update PKGBUILD
if: steps.check_version.outputs.need_update == 'true'
run: |
VERSION=${{ steps.check_version.outputs.latest_version }}
SHA=${{ steps.sha.outputs.sha }}

VERSION="${{ steps.check_version.outputs.latest_version }}"
SHA="${{ steps.sha.outputs.sha }}"
cd publishing
sed -i "s/^pkgver=.*/pkgver=$VERSION/" PKGBUILD
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
sed -i "s/sha256sums=.*/sha256sums=('$SHA')/" PKGBUILD

git add PKGBUILD
git commit -m "upgpkg: pictopy-bin $VERSION"
git push
Expand All @@ -80,22 +78,22 @@ jobs:
runs-on: ubuntu-latest
needs: update_version
if: needs.update_version.outputs.need_update == 'true'

steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: PKGBUILD
path: publishing/

- name: Publish to AUR
uses: KSXGitHub/github-actions-deploy-aur@v4.1.3
with:
pkgname: pictopy-bin
pkgbuild: ./PKGBUILD
pkgbuild: ./publishing/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: v${{ needs.update_version.outputs.latest_version }}
commit_message: ${{ needs.update_version.outputs.latest_version }}
ssh_keyscan_types: rsa,ecdsa,ed25519
Comment thread
akshajtiwari marked this conversation as resolved.
updpkgsums: false
allow_empty_commits: false
Loading
Loading