Skip to content

Comments

Docfx/context7 chat#25

Merged
gimlichael merged 3 commits intomainfrom
docfx/context7-chat
Feb 20, 2026
Merged

Docfx/context7 chat#25
gimlichael merged 3 commits intomainfrom
docfx/context7-chat

Conversation

@gimlichael
Copy link
Member

This pull request introduces a new automated workflow for service updates and downstream dependency management, along with improvements to release notes formatting and documentation. The main focus is to streamline package version bumps triggered by upstream releases, ensure consistent release note formatting, and enable easier propagation of updates across repositories.

Automated Service Update and Downstream Triggering

  • Added .github/workflows/service-update.yml to automate service update PRs, including package version bumps, release notes, and changelog updates, triggered by repository dispatch or manual workflow dispatch.
  • Introduced .github/scripts/bump-nuget.py, a script that selectively bumps only Codebelt, Cuemon, and Savvyio package versions based on the triggering source and version, skipping third-party dependencies.
  • Added .github/workflows/trigger-downstream.yml to automatically dispatch service update events to downstream repositories when a release is published, propagating dependency updates across the ecosystem.
  • Created .github/dispatch-targets.json as a placeholder for downstream repositories to receive automated dispatch events.

Release Notes and Documentation Improvements

  • Standardized the format of version entries in all PackageReleaseNotes.txt files to use Version: x.y.z for consistency and easier parsing. [1] [2] [3] [4] [5] [6] [7]
  • Enhanced the documentation footer in .docfx/docfx.json by adding an external widget script for improved context and analytics.

@gimlichael gimlichael self-assigned this Feb 20, 2026
Copilot AI review requested due to automatic review settings February 20, 2026 17:19
@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Warning

Rate limit exceeded

@gimlichael has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 31 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docfx/context7-chat

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.84%. Comparing base (7298250) to head (a077fb7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #25   +/-   ##
=======================================
  Coverage   83.84%   83.84%           
=======================================
  Files          20       20           
  Lines         260      260           
  Branches       19       19           
=======================================
  Hits          218      218           
  Misses         42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request introduces an automated workflow infrastructure for managing downstream dependency updates across the Codebelt ecosystem. The PR standardizes release notes formatting and adds automation for propagating package version updates when upstream dependencies are released.

Changes:

  • Adds automated service update workflow that creates PRs when triggered by upstream releases or manual dispatch
  • Introduces downstream triggering workflow to notify dependent repositories when a release is published
  • Standardizes PackageReleaseNotes.txt format to use Version: x.y.z consistently for easier parsing

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
.github/workflows/service-update.yml New workflow that automates version bumps, release notes updates, and PR creation when triggered by repository dispatch or manual workflow dispatch
.github/workflows/trigger-downstream.yml New workflow that dispatches service update events to downstream repositories when a release is published
.github/scripts/bump-nuget.py Python script that selectively bumps only Codebelt/Cuemon/Savvyio package versions based on the triggering source
.github/dispatch-targets.json Placeholder JSON array for downstream repository targets (currently empty)
.nuget/Codebelt.Bootstrapper/PackageReleaseNotes.txt Standardized version format from Version x.y.z to Version: x.y.z (added colon)
.nuget/Codebelt.Bootstrapper.Worker/PackageReleaseNotes.txt Standardized version format from Version x.y.z to Version: x.y.z (added colon)
.nuget/Codebelt.Bootstrapper.Web/PackageReleaseNotes.txt Standardized version format from Version x.y.z to Version: x.y.z (added colon)
.nuget/Codebelt.Bootstrapper.Console/PackageReleaseNotes.txt Standardized version format from Version x.y.z to Version: x.y.z (added colon)
.docfx/docfx.json Added external Context7 analytics widget script to documentation footer

Comment on lines +49 to +74
python3 - <<'EOF'
import json, urllib.request, os, sys

targets = json.load(open('.github/dispatch-targets.json'))
token = os.environ['GH_TOKEN']
version = os.environ['VERSION']
source = os.environ['SOURCE_REPO']

for repo in targets:
url = f'https://api.github.com/repos/codebeltnet/{repo}/dispatches'
payload = json.dumps({
'event_type': 'codebelt-service-update',
'client_payload': {
'source_repo': source,
'source_version': version
}
}).encode()
req = urllib.request.Request(url, data=payload, method='POST', headers={
'Authorization': f'Bearer {token}',
'Accept': 'application/vnd.github+json',
'Content-Type': 'application/json',
'X-GitHub-Api-Version': '2022-11-28'
})
with urllib.request.urlopen(req) as r:
print(f'✓ Dispatched to {repo}: HTTP {r.status}')
EOF
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The inline Python script has no error handling for failed HTTP requests. If a dispatch to a downstream repository fails (e.g., due to authentication issues, network problems, or the repository not existing), the script will crash and stop processing remaining repositories. Consider wrapping the urlopen call in a try-except block to log the error and continue processing other repositories.

Copilot uses AI. Check for mistakes.
source = os.environ['SOURCE_REPO']

for repo in targets:
url = f'https://api.github.com/repos/codebeltnet/{repo}/dispatches'
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The workflow uses a hardcoded organization name 'codebeltnet' in the URL construction (line 58). If the repository structure or organization changes, this will break. Consider using environment variables or dynamic resolution from the GitHub context to make this more maintainable.

Copilot uses AI. Check for mistakes.
"globalMetadata": {
"_appTitle": "Bootstrapper by Codebelt",
"_appFooter": "<span>Generated by <strong>DocFX</strong>. Copyright 2024-2026 Geekle. All rights reserved.</span>",
"_appFooter": "<span>Generated by <strong>DocFX</strong>. Copyright 2024-2026 Geekle. All rights reserved.</span><script async src=\"https://context7.com/widget.js\" data-library=\"/codebeltnet/bootstrapper\"></script>",
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

Adding an external JavaScript widget from context7.com directly in the footer. Ensure that this third-party script is trusted and that loading it doesn't pose security risks. Consider verifying that the script uses Subresource Integrity (SRI) hashes or that context7.com has appropriate security measures in place. Additionally, the async attribute is good for performance, but consider whether the script should have defer instead if it needs to maintain document order execution.

Suggested change
"_appFooter": "<span>Generated by <strong>DocFX</strong>. Copyright 2024-2026 Geekle. All rights reserved.</span><script async src=\"https://context7.com/widget.js\" data-library=\"/codebeltnet/bootstrapper\"></script>",
"_appFooter": "<span>Generated by <strong>DocFX</strong>. Copyright 2024-2026 Geekle. All rights reserved.</span>",

Copilot uses AI. Check for mistakes.
- name: Determine new version for this repo
id: newver
run: |
CURRENT=$(grep -oP '(?<=## \[)[\d.]+(?=\])' CHANGELOG.md | head -1)
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The version extraction regex (?<=## \[)[\d.]+(?=\]) assumes that the latest version in CHANGELOG.md is always in the format ## [x.y.z]. If the CHANGELOG.md format changes or if there are any non-version entries in square brackets before the actual version (e.g., ## [Unreleased]), this will extract the wrong value. Consider making the regex more specific or adding validation to ensure the extracted value is a valid semantic version.

Suggested change
CURRENT=$(grep -oP '(?<=## \[)[\d.]+(?=\])' CHANGELOG.md | head -1)
CURRENT=$(grep -oP '^## \[\K[0-9]+\.[0-9]+\.[0-9]+(?=\])' CHANGELOG.md | head -1)

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
[ ]
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The JSON array contains a space between the brackets. While this is valid JSON, it's unconventional and could cause issues with parsing. Standard JSON convention for empty arrays is to have no whitespace between brackets.

Suggested change
[ ]
[]

Copilot uses AI. Check for mistakes.
with open("Directory.Packages.props", "w") as f:
f.write(new_content)

return 0 if changes else 0 # Return 0 even if no changes (not an error)
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The line return 0 if changes else 0 always returns 0 regardless of whether changes were made. While the comment explains this is intentional (not an error), this could be simplified to just return 0 for better clarity. The conditional serves no functional purpose.

Suggested change
return 0 if changes else 0 # Return 0 even if no changes (not an error)
return 0 # Return 0 even if no changes (not an error)

Copilot uses AI. Check for mistakes.
'Content-Type': 'application/json',
'X-GitHub-Api-Version': '2022-11-28'
})
with urllib.request.urlopen(req) as r:
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The script uses urllib.request.urlopen without a timeout parameter. This means the request could hang indefinitely if the GitHub API is slow to respond. Consider adding a timeout parameter to prevent the workflow from hanging, for example: urllib.request.urlopen(req, timeout=30).

Suggested change
with urllib.request.urlopen(req) as r:
with urllib.request.urlopen(req, timeout=30) as r:

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@gimlichael gimlichael merged commit fa38c41 into main Feb 20, 2026
26 of 27 checks passed
@gimlichael gimlichael deleted the docfx/context7-chat branch February 20, 2026 19:22
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