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
30 changes: 30 additions & 0 deletions .github/dependabot.yml
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"
32 changes: 32 additions & 0 deletions .github/workflows/auto-changelog.yml
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
Comment on lines +26 to +32
Copy link

Copilot AI Jan 3, 2026

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.

Suggested change
- 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
- name: Upload CHANGELOG artifact
uses: actions/upload-artifact@v4
with:
name: changelog-${{ github.ref_name }}
path: CHANGELOG.md

Copilot uses AI. Check for mistakes.
87 changes: 87 additions & 0 deletions .github/workflows/ci.yml
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
27 changes: 27 additions & 0 deletions .github/workflows/dependabot-auto.yml
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 }}
122 changes: 122 additions & 0 deletions .github/workflows/release.yml
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
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CARGO_TOKEN secret is being passed directly to cargo login which will log the token in the command. While GitHub Actions masks secrets in logs, it's better practice to use the CARGO_REGISTRY_TOKEN environment variable instead, which cargo automatically recognizes without needing to call cargo login. This avoids any potential token exposure and simplifies the workflow.

Suggested change
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 uses AI. Check for mistakes.

- name: Wait for crates.io indexing
run: sleep 30
Copy link

Copilot AI Jan 3, 2026

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.

Suggested change
run: sleep 30
run: sleep 60

Copilot uses AI. Check for mistakes.

- name: Publish dev-forge CLI
run: cargo publish -p dev-forge --no-verify
Comment on lines +23 to +29
Copy link

Copilot AI Jan 3, 2026

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.

Suggested change
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

Copilot uses AI. Check for mistakes.

build-binaries:
name: Build Binaries
needs: publish-crates
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: dev-forge-linux-x64
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
artifact: dev-forge-linux-musl-x64
- os: macos-latest
target: x86_64-apple-darwin
artifact: dev-forge-macos-x64
- os: macos-latest
target: aarch64-apple-darwin
artifact: dev-forge-macos-arm64
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact: dev-forge-windows-x64.exe

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2

- name: Install musl tools
if: matrix.target == 'x86_64-unknown-linux-musl'
run: sudo apt-get install -y musl-tools

- name: Build binary
run: cargo build --release --target ${{ matrix.target }} -p dev-forge

- name: Rename binary (Unix)
if: runner.os != 'Windows'
run: |
cp target/${{ matrix.target }}/release/dev-forge ${{ matrix.artifact }}

- name: Rename binary (Windows)
if: runner.os == 'Windows'
run: |
cp target/${{ matrix.target }}/release/dev-forge.exe ${{ matrix.artifact }}

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}

create-release:
name: Create GitHub Release
needs: build-binaries
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: artifacts/**/*
generate_release_notes: true
body: |
## 🚀 Installation

### Via cargo (recommended)
```bash
cargo install dev-forge
```

### Via binary
Download the binary for your platform below and add it to your PATH.

### Verification
```bash
dev-forge --version
```

## 📝 What's Changed
See the auto-generated release notes below.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@
# Ignorer les fichiers spécifiques à l'IDE
.idea/
.vscode/
*.iml
*.iml

explain_project.md
68 changes: 68 additions & 0 deletions CONTRIBUTING.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 ! 🚀
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[workspace]
Loading
Loading