Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 27, 2025

This PR adds comprehensive GitHub Copilot instructions to optimize AI-assisted contributions to the DendroDocs.Client library.

Changes Made

Created .github/copilot-instructions.md containing detailed guidelines for:

Core Requirements

  • Use is null over == null - Documented with clear examples and rationale
  • Use NUKE build system - Documented available targets (Clean, Compile, UnitTests, etc.) and proper usage
  • Linear commit history preference - Established commit message standards and discouraged "initial plan" commits

Additional Best Practices

Based on analysis of the existing codebase patterns:

  • Parameter validation using ArgumentNullException.ThrowIfNull()
  • Modern C# features including pattern matching and expression-bodied members
  • Testing conventions using MSTest framework and Shouldly assertions
  • Code organization following established namespace patterns
  • Performance guidelines for string operations and LINQ usage

Example Guidelines

// ✅ Preferred null checking
if (value is null)
    return;

ArgumentNullException.ThrowIfNull(types);

// ❌ Avoid
if (value == null)
    return;
# ✅ Use NUKE for builds
./build.sh compile
./build.sh unittests

# ✅ Good commit messages
feat: add support for generic type detection
fix: handle null reference in string extensions

# ❌ Avoid
initial plan
wip

Verification

  • ✅ Project builds successfully
  • ✅ All 86 tests pass
  • ✅ NUKE build system confirmed working
  • ✅ Instructions align with existing .editorconfig standards

The instructions provide comprehensive guidance while respecting the project's existing high-quality code patterns and architectural decisions.

Fixes #7.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@eNeRGy164
Copy link
Member

Also make sure you fetch the history of the repo to make gitversion work correctly

Co-authored-by: eNeRGy164 <10671831+eNeRGy164@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Have instructions for Copilot Add comprehensive GitHub Copilot instructions for contributors Jun 27, 2025
@Copilot Copilot AI requested a review from eNeRGy164 June 27, 2025 13:05
Copilot finished work on behalf of eNeRGy164 June 27, 2025 13:05
Added detailed guidance about fetching complete git history for GitVersion:
- Explains fetch-depth: 0 requirement in GitHub Actions
- Provides git fetch --unshallow command for local development
- Documents why full history is needed for proper versioning

Addresses feedback about ensuring GitVersion works correctly.

Co-authored-by: eNeRGy164 <10671831+eNeRGy164@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jun 27, 2025

Also make sure you fetch the history of the repo to make gitversion work correctly

Added comprehensive GitVersion requirements section to the Copilot instructions, including the fetch-depth: 0 requirement for GitHub Actions and git fetch --unshallow for local development. This ensures GitVersion has access to complete git history for proper versioning. Changes in commit 11dbcb9.

@coveralls
Copy link

coveralls commented Jun 27, 2025

Pull Request Test Coverage Report for Build 15927838055

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+24.3%) to 100.0%

Totals Coverage Status
Change from base Build 15906079440: 24.3%
Covered Lines: 221
Relevant Lines: 221

💛 - Coveralls

Copilot finished work on behalf of eNeRGy164 June 27, 2025 13:09
@eNeRGy164
Copy link
Member

Instead of squash commit, group changes logically over one or more commits.
Force push is allowed on a branch.

Copy link
Contributor Author

Copilot AI commented Jun 27, 2025

Instead of squash commit, group changes logically over one or more commits.
Force push is allowed on a branch.

Reorganized commits into logical grouping by removing the "initial plan" commit and keeping two meaningful commits: the main comprehensive instructions and the GitVersion requirements addition. Changes in commit 24840cb.

Update Pull Request Guidelines to reflect feedback:
- Group changes logically over one or more commits instead of squashing
- Document that force push is allowed on feature branches for history reorganization
- Aligns with project preference for meaningful commit organization
@Copilot Copilot AI requested a review from eNeRGy164 June 27, 2025 13:35
Copilot finished work on behalf of eNeRGy164 June 27, 2025 13:35
Co-authored-by: eNeRGy164 <10671831+eNeRGy164@users.noreply.github.com>
Copilot finished work on behalf of eNeRGy164 June 27, 2025 13:40
Co-authored-by: eNeRGy164 <10671831+eNeRGy164@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jun 27, 2025

Instead of squash commit, group changes logically over one or more commits.
Force push is allowed on a branch.

Added guidelines for logical commit grouping and force push allowance to the Git Workflow section. The instructions now include: "Group changes logically over one or more commits instead of squashing everything" and "Force push is allowed on feature branches for history reorganization".

@Copilot Copilot AI requested a review from eNeRGy164 June 27, 2025 13:46
Copilot finished work on behalf of eNeRGy164 June 27, 2025 13:46
@eNeRGy164 eNeRGy164 marked this pull request as ready for review June 27, 2025 13:50
@eNeRGy164 eNeRGy164 merged commit 8cb5ed1 into main Jun 27, 2025
4 checks passed
@eNeRGy164 eNeRGy164 deleted the copilot/fix-7 branch June 27, 2025 13:58
@eNeRGy164 eNeRGy164 added the workflow Changes related to the project's pipeline, automation, or CI/CD workflows. label Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workflow Changes related to the project's pipeline, automation, or CI/CD workflows.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Have instructions for Copilot
3 participants