File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ module.exports.register = function () {
1818 const args = {
1919 repo : process . env . PREVIEW_REPO ,
2020 branch : process . env . PREVIEW_BRANCH || 'HEAD' ,
21+ // watermark branch allows us to masquerade as a different branch
22+ // this is useful for previewing a PR against the main branch e.g.
23+ // so that the watermark lines don't trigger in the diff.
2124 watermark_branch : process . env . PREVIEW_WATERMARK_BRANCH ,
2225 config : process . env . PREVIEW_CONFIG || process . env . PREVIEW_BRANCH || 'HEAD' ,
2326 remote : process . env . PREVIEW_REMOTE ? true : false ,
@@ -136,7 +139,7 @@ module.exports.register = function () {
136139 playbook . content . sources = mappedSources
137140
138141 const date = new Date ( ) . toISOString ( ) . split ( 'T' ) [ 0 ]
139- const watermark_branch = args . watermark || args . branch
142+ const watermark_branch = args . watermark_branch || args . branch
140143 playbook . asciidoc . attributes [ 'page-watermark' ] =
141144 `${ date } ${ args . repo } ${ watermark_branch } `
142145
You can’t perform that action at this time.
0 commit comments