Skip to content

Conversation

@jll63
Copy link
Collaborator

@jll63 jll63 commented Nov 3, 2025

I’d just suggest adding a few checks and fallback values there (from Slack)

Not sure what a fallback value should be, although there is one: if the script doesn't recognize the context, it leaves base-url alone, that is, currently, it links to the release branch.

@pdimov for awareness

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 PR adds CI environment detection and dynamic base URL configuration to the Antora documentation build process, and removes a branch restriction from the GitHub Pages deployment workflow.

  • Detects CircleCI and GitHub CI environments to set repository-specific base URLs
  • Modifies and restores mrdocs.yml configuration file during the build process
  • Allows GitHub Pages deployment for any branch (previously restricted to feature/doc)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
doc/build_antora.sh Adds CI environment detection logic to dynamically set base URLs and implements config file backup/restore mechanism
.github/workflows/ci.yml Removes branch name restriction from GitHub Pages deployment condition

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +37 to +44
base_url="https://github.com/${repository}/blob/${sha}/"

if [ -n "${base_url}" ]; then
echo "Setting base-url to $base_url"
cp mrdocs.yml mrdocs.yml.bak
perl -i -pe 's{^\s*base-url:.*$}{base-url: '"$base_url"'}' mrdocs.yml
fi

Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

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

The base_url variable is set unconditionally even when repository and sha are undefined (i.e., when neither CIRCLE_REPOSITORY_URL nor GITHUB_REPOSITORY is set). This results in an invalid URL https://github.com//blob//. The assignment should be moved inside the conditional block or wrapped in a check for non-empty repository and sha.

Suggested change
base_url="https://github.com/${repository}/blob/${sha}/"
if [ -n "${base_url}" ]; then
echo "Setting base-url to $base_url"
cp mrdocs.yml mrdocs.yml.bak
perl -i -pe 's{^\s*base-url:.*$}{base-url: '"$base_url"'}' mrdocs.yml
fi
if [ -n "${repository}" ] && [ -n "${sha}" ]; then
base_url="https://github.com/${repository}/blob/${sha}/"
echo "Setting base-url to $base_url"
cp mrdocs.yml mrdocs.yml.bak
perl -i -pe 's{^\s*base-url:.*$}{base-url: '"$base_url"'}' mrdocs.yml
fi

Copilot uses AI. Check for mistakes.
@alandefreitas
Copy link
Member

Not sure what a fallback value should be

Hey! 😊 I was thinking maybe:

  • "boostorg" for ORG (since it looks like ORG isn’t used in the script anymore — not totally sure though, maybe "boostorg/openmethod" for the whole repo)
  • "master" instead of the SHA, in case that specific SHA can’t be found

But of course, you’d need to check if that really makes sense 👍❤️

@alandefreitas
Copy link
Member

These changes are great, by the way 😊 I can totally see a lot of people replicating this logic

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.03%. Comparing base (f7d47fb) to head (3187c8f).
⚠️ Report is 6 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #45      +/-   ##
===========================================
- Coverage    93.03%   92.03%   -1.00%     
===========================================
  Files           40       40              
  Lines         2713     2838     +125     
  Branches      1226     1354     +128     
===========================================
+ Hits          2524     2612      +88     
- Misses         159      187      +28     
- Partials        30       39       +9     

see 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 83bc8d2...3187c8f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jll63 and others added 2 commits November 4, 2025 21:56
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.

2 participants