-
Notifications
You must be signed in to change notification settings - Fork 347
Add source_branch attribute #1147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The `source_branch` attribute should be useful in resolving inter-book links. We can get this *perfect* when we're running with `--all` because every book already *has* a branch attribute. When we build with `--doc` we have to guess. I've added some heuristics that I feal are likely to guess right most of the time for most folks. I'm not too worried about guessing wrong *sometimes* because, for the most part, that'll only break interbook links and lots of folks don't check those locally anyway. And because we have the pull request tests which run with `--all` so they'll serve as an accurate backstop. Relates to elastic#804
|
@olksdr I went "full perl" on this one. The only difficult part of this is the regular expression. And the testing. |
|
Oooh good catch past-me! |
|
Wrote a test for that weird case. |
|
When I remove the source_branch attribute from elastic/stack-docs#493, the Stack Overview still builds successfully. Therefore, this LGTM |
olksdr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! ![]()
|
Thanks for reviewing @olksdr! |
The
source_branchattribute should be useful in resolving inter-booklinks. We can get this perfect when we're running with
--allbecauseevery book already has a branch attribute. When we build with
--docwe have to guess. I've added some heuristics that I feal are likely to
guess right most of the time for most folks. I'm not too worried about
guessing wrong sometimes because, for the most part, that'll only
break interbook links and lots of folks don't check those locally
anyway. And because we have the pull request tests which run with
--allso they'll serve as an accurate backstop.Relates to #804