Skip to content

Fix Copilot Workflow to unshallow Copilot branch#2124

Merged
johlju merged 8 commits intomainfrom
fix/copilot-workflow-shallow
Aug 1, 2025
Merged

Fix Copilot Workflow to unshallow Copilot branch#2124
johlju merged 8 commits intomainfrom
fix/copilot-workflow-shallow

Conversation

@johlju
Copy link
Member

@johlju johlju commented Aug 1, 2025

This change is Reviewable

@johlju johlju requested a review from a team as a code owner August 1, 2025 14:42
@coderabbitai
Copy link

coderabbitai bot commented Aug 1, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Workflow files for GitHub Actions and Azure Pipelines were updated to run the dotnet-gitversion command immediately after installing the GitVersion tool, in addition to the existing steps that parse its output. The Copilot workflow was further adjusted to unshallow the repository after checkout, and the changelog was updated accordingly.

Changes

Cohort / File(s) Change Summary
GitHub Actions: GitVersion Invocation
.github/workflows/code-analysis-built-module.yml, .github/workflows/code-analysis.yml
Modified the GitVersion tool installation steps to also immediately run dotnet-gitversion after installing, prior to the separate step that parses its output.
Copilot Workflow Adjustments
.github/workflows/copilot-setup-steps.yml
Reduced checkout fetch depth, added a step to unshallow the repository, enabled and updated GitVersion verification steps, and removed the hardcoded module version assignment.
Azure Pipelines: GitVersion Invocation
azure-pipelines.yml
Added a direct call to dotnet-gitversion immediately after installing GitVersion.Tool in the build job.
Changelog Update
CHANGELOG.md
Revised the "Unreleased" section to note the attempt to unshallow the Copilot branch and removed references to previously hardcoded versioning workarounds.

Sequence Diagram(s)

sequenceDiagram
    participant Workflow
    participant GitVersionTool
    participant Repo

    Workflow->>Repo: Checkout (shallow or limited depth)
    Workflow->>Repo: Unshallow repository (if needed)
    Workflow->>GitVersionTool: Install GitVersion.Tool
    Workflow->>GitVersionTool: Run dotnet-gitversion (immediate check)
    Workflow->>GitVersionTool: Run dotnet-gitversion | ConvertFrom-Json (parse output)
    Workflow->>Workflow: Use version info in build steps
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c384a4 and 43aba51.

📒 Files selected for processing (2)
  • .github/workflows/copilot-setup-steps.yml (2 hunks)
  • CHANGELOG.md (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/copilot-workflow-shallow

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🔭 Outside diff range comments (1)
.github/workflows/code-analysis.yml (1)

24-32: Avoid running dotnet-gitversion twice – consolidate the steps

The command is now executed immediately after installation (Line 28) and again in the next “Run GitVersion” step (Line 32).
Running the tool twice adds ~5 s to every job and introduces one more point of failure without adding extra value.

-      - name: Install GitVersion
-        shell: powershell
-        run: |
-          dotnet tool install --global GitVersion.Tool --version 5.*
-          dotnet-gitversion
-      - name: Run GitVersion
-        shell: powershell
-        run: |
-          dotnet-gitversion | ConvertFrom-Json
+      - name: Install + Run GitVersion
+        shell: powershell
+        run: |
+          dotnet tool install --global GitVersion.Tool --version 5.*
+          dotnet-gitversion | ConvertFrom-Json

Keeps the verification but removes the duplicate invocation.

♻️ Duplicate comments (1)
.github/workflows/code-analysis-built-module.yml (1)

24-32: Same duplicate dotnet-gitversion invocation as in the source analysis workflow

The first call added on Line 28 is only used as a smoke-test, but the JSON-parsing step a few lines later runs the tool again.
For consistency and faster CI, merge both into one step as suggested in the previous file.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9767f1e and 3c384a4.

📒 Files selected for processing (5)
  • .github/workflows/code-analysis-built-module.yml (1 hunks)
  • .github/workflows/code-analysis.yml (1 hunks)
  • .github/workflows/copilot-setup-steps.yml (2 hunks)
  • CHANGELOG.md (1 hunks)
  • azure-pipelines.yml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md

📄 CodeRabbit Inference Engine (.github/copilot-instructions.md)

**/*.md: Line length in Markdown files should be wrapped after a word when a line exceeds 80 characters.
Use 2 spaces for indentation in Markdown files.

Files:

  • CHANGELOG.md
🧠 Learnings (1)
📚 Learning: applies to tests/integration/commands/*.integration.tests.ps1 : all integration tests must use the p...
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-01T12:29:39.352Z
Learning: Applies to tests/Integration/Commands/*.Integration.Tests.ps1 : All integration tests must use the provided code block prior to the first Describe block to set up the integration test environment and ensure the module being tested is available.

Applied to files:

  • .github/workflows/copilot-setup-steps.yml
🪛 YAMLlint (1.37.1)
.github/workflows/copilot-setup-steps.yml

[warning] 40-40: missing starting space in comment

(comments)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: dsccommunity.SqlServerDsc (Build Package Module)
  • GitHub Check: PSScriptAnalyzer
  • GitHub Check: PSScriptAnalyzer
🔇 Additional comments (1)
.github/workflows/copilot-setup-steps.yml (1)

85-87: Wildcard tool version may break reproducibility

dotnet tool install --global GitVersion.Tool --version 5.* floats to whatever the latest 5.x is at runtime. Pinning to a specific patch (e.g., 5.12.0) makes builds deterministic and shields you from sudden breaking changes.

@johlju johlju merged commit 79dcc9f into main Aug 1, 2025
4 of 9 checks passed
@johlju johlju deleted the fix/copilot-workflow-shallow branch August 1, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments