-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add .github and deny.toml and cliff.toml #1
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| version: 2 | ||
| updates: | ||
| # Rust dependencies | ||
| - package-ecosystem: "cargo" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| day: "monday" | ||
| time: "09:00" | ||
| open-pull-requests-limit: 10 | ||
| labels: | ||
| - "dependencies" | ||
| - "rust" | ||
| commit-message: | ||
| prefix: "chore" | ||
| include: "scope" | ||
|
|
||
| # GitHub Actions | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| day: "monday" | ||
| time: "09:00" | ||
| open-pull-requests-limit: 5 | ||
| labels: | ||
| - "dependencies" | ||
| - "ci" | ||
| commit-message: | ||
| prefix: "ci" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Auto Changelog | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| jobs: | ||
| changelog: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Generate changelog | ||
| uses: orhun/git-cliff-action@v3 | ||
| with: | ||
| config: cliff.toml | ||
| args: --verbose --tag ${{ github.ref_name }} | ||
| env: | ||
| OUTPUT: CHANGELOG.md | ||
|
|
||
| - name: Commit CHANGELOG | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add CHANGELOG.md | ||
| git commit -m "chore: update CHANGELOG for ${{ github.ref_name }}" || exit 0 | ||
| git push origin HEAD:main | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - dev | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - dev | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| RUST_BACKTRACE: 1 | ||
|
|
||
| jobs: | ||
| check: | ||
| name: Check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - run: cargo check --all-features --workspace | ||
|
|
||
| test: | ||
| name: Test | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - run: cargo test --all-features --workspace | ||
|
|
||
| fmt: | ||
| name: Format | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: rustfmt | ||
| - run: cargo fmt --all -- --check | ||
|
|
||
| clippy: | ||
| name: Clippy | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: clippy | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - run: cargo clippy --all-features --workspace -- -D warnings | ||
|
|
||
| build: | ||
| name: Build | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - run: cargo build --release --all-features --workspace | ||
|
|
||
| audit: | ||
| name: Security Audit | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: taiki-e/install-action@v2 | ||
| with: | ||
| tool: cargo-audit | ||
| - run: cargo audit | ||
|
|
||
| deny: | ||
| name: Cargo Deny | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: taiki-e/install-action@v2 | ||
| with: | ||
| tool: cargo-deny | ||
| - run: cargo deny check |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Dependabot Auto-Merge | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| auto-merge: | ||
| name: Auto-merge Dependabot PRs | ||
| runs-on: ubuntu-latest | ||
| if: github.actor == 'dependabot[bot]' | ||
| steps: | ||
| - name: Dependabot metadata | ||
| id: metadata | ||
| uses: dependabot/fetch-metadata@v2 | ||
|
|
||
| - name: Auto-merge minor updates | ||
| if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' | ||
| run: gh pr merge --auto --squash "$PR_URL" | ||
| env: | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,122 @@ | ||||||||||||||||||||||||||||||||||||||
| name: Release | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||
| tags: | ||||||||||||||||||||||||||||||||||||||
| - 'v*' | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||
| CARGO_TERM_COLOR: always | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||
| publish-crates: | ||||||||||||||||||||||||||||||||||||||
| name: Publish to crates.io | ||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||
| - uses: dtolnay/rust-toolchain@stable | ||||||||||||||||||||||||||||||||||||||
| - uses: Swatinem/rust-cache@v2 | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Publish dev-forge-core | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| cargo login ${{ secrets.CARGO_TOKEN }} | ||||||||||||||||||||||||||||||||||||||
| cargo publish -p dev-forge-core --no-verify | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+15
to
+23
|
||||||||||||||||||||||||||||||||||||||
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Publish dev-forge-core | |
| run: | | |
| cargo login ${{ secrets.CARGO_TOKEN }} | |
| cargo publish -p dev-forge-core --no-verify | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Publish dev-forge-core | |
| run: cargo publish -p dev-forge-core --no-verify |
Copilot
AI
Jan 3, 2026
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 30-second wait between publishing crates may not be sufficient for crates.io to fully index the first crate before the second one is published. This can cause the second publish to fail if it depends on the first. The recommended wait time is typically 60-90 seconds. Consider increasing the sleep duration to at least 60 seconds to ensure reliable publishing.
| run: sleep 30 | |
| run: sleep 60 |
Copilot
AI
Jan 3, 2026
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 release workflow uses --no-verify flag when publishing crates. This flag skips important verification steps that ensure the package can be built from the published tarball. While this might speed up publishing, it can lead to publishing broken packages that fail to install for users. Consider removing the --no-verify flag to ensure package integrity before publishing to crates.io.
| cargo publish -p dev-forge-core --no-verify | |
| - name: Wait for crates.io indexing | |
| run: sleep 30 | |
| - name: Publish dev-forge CLI | |
| run: cargo publish -p dev-forge --no-verify | |
| cargo publish -p dev-forge-core | |
| - name: Wait for crates.io indexing | |
| run: sleep 30 | |
| - name: Publish dev-forge CLI | |
| run: cargo publish -p dev-forge |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,4 +12,6 @@ | |
| # Ignorer les fichiers spécifiques à l'IDE | ||
| .idea/ | ||
| .vscode/ | ||
| *.iml | ||
| *.iml | ||
|
|
||
| explain_project.md | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Guide de Contribution | ||
|
|
||
| Merci de vouloir contribuer à ce projet ! Voici quelques règles pour garantir une collaboration efficace et harmonieuse. | ||
|
|
||
| ## Processus de Contribution | ||
|
|
||
| 1. **Forker le dépôt** : Créez une copie de ce dépôt sur votre compte GitHub. | ||
| 2. **Créer une branche de travail** : Travaillez sur une branche dédiée pour chaque fonctionnalité ou correction de bug. Cette branche doit être créée à partir de `dev`. | ||
|
|
||
| ```bash | ||
| git checkout dev | ||
| git checkout -b nom-de-la-branche | ||
| ``` | ||
|
|
||
| 3. **Pousser la branche de travail** : Une fois votre travail terminé ou prêt à être partagé, poussez votre branche vers le dépôt distant. | ||
|
|
||
| ```bash | ||
| git push origin nom-de-la-branche | ||
| ``` | ||
|
|
||
| 4. **Soumettre une Pull Request (PR)** : | ||
| - **Vers `dev`** : | ||
| - Ouvrez une PR de votre branche de travail vers la branche `dev`. | ||
| - Cette branche est utilisée pour le développement actif. | ||
| - **Vers `main`** : | ||
| - Une fois que `dev` est stable, ouvrez une PR de `dev` vers `main` pour les releases stables. | ||
|
|
||
| ## Règles de Codage | ||
|
|
||
| - Respectez les conventions de codage définies dans le projet. | ||
| - Ajoutez des tests pour toute nouvelle fonctionnalité ou correction de bug. | ||
| - Assurez-vous que votre code est bien formaté et documenté. | ||
|
|
||
| ## Règles pour les Commits | ||
|
|
||
| Nous utilisons la convention [Conventional Commits](https://www.conventionalcommits.org/) pour garantir des messages de commit clairs et standardisés. Tous les messages de commit doivent être rédigés en anglais. Voici les types de commits acceptés : | ||
|
|
||
| - **feat** : Ajout d'une nouvelle fonctionnalité. | ||
| - **fix** : Correction d'un bug. | ||
| - **docs** : Modifications de la documentation. | ||
| - **style** : Changements de style (formatage, espaces, etc.) sans impact sur le code. | ||
| - **refactor** : Refactorisation du code sans ajout de fonctionnalité ni correction de bug. | ||
| - **test** : Ajout ou modification de tests. | ||
| - **chore** : Changements mineurs (mise à jour des dépendances, configuration, etc.). | ||
|
|
||
| ### Exemple de message de commit | ||
|
|
||
| ```text | ||
| feat: Add a command to analyze errors | ||
|
|
||
| This command allows analyzing compiler errors and suggesting solutions. | ||
| ``` | ||
|
|
||
| - La première ligne doit être concise (50 caractères max) et décrire le changement. | ||
| - Ajoutez une ligne vide après la première ligne. | ||
| - Fournissez une description plus détaillée si nécessaire. | ||
|
|
||
| ## Revue de Code | ||
|
|
||
| - Les PR doivent être approuvées par au moins un mainteneur avant d'être fusionnées. | ||
| - Répondez rapidement aux commentaires sur votre PR. | ||
|
|
||
| ## CI/CD | ||
|
|
||
| - Toutes les PR doivent passer les tests automatisés avant d'être fusionnées. | ||
| - Vérifiez que votre code ne casse pas le pipeline CI. | ||
|
|
||
| Merci pour votre contribution ! 🚀 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [workspace] |
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 auto-changelog workflow attempts to push to the main branch after generating the changelog. This creates a potential issue: when a tag is pushed, this workflow generates a changelog and tries to commit it back to main. However, this commit happens AFTER the tag was already created, meaning the changelog update won't be included in the tagged release. Consider moving the changelog generation to happen before creating the tag, or restructure this workflow to update the changelog as part of the release preparation process.