Fork/branch-aware edit on GH links, part 1/?

This commit is contained in:
mDuo13
2018-03-07 14:41:33 -08:00
parent 34e74eb51a
commit 560c84f4f9
3 changed files with 18 additions and 3 deletions

View File

@@ -2,6 +2,11 @@
# meant to be run from the root directory of the repo
## Test: show pull request data in build results
echo "ghprbAuthorRepoGitUrl is: " ${ghprbAuthorRepoGitUrl}
echo "ghprbSourceBranch is: " ${ghprbSourceBranch}
echo "ghprbPullId is: " ${ghprbPullId}
set -e
tool/conflictmarkers.sh

View File

@@ -55,9 +55,13 @@
<div class="draft-warning">DRAFT PAGE</div>
<div class="github-edit-wrap">
{% if currentpage.md is defined %}
{% set githuburl = "https://github.com/ripple/ripple-dev-portal/edit/master/content/" + currentpage.md %}
{% set githuburl = "https://github.com/"
+ target.github_fork + "/ripple-dev-portal/edit/"
+ target.github_branch + "/content/" + currentpage.md %}
{% elif currentpage.template is defined %}
{% set githuburl = "https://github.com/ripple/ripple-dev-portal/edit/master/tool/" + currentpage.template %}
{% set githuburl = "https://github.com/"
+ target.github_fork + "/ripple-dev-portal/edit/"
+ target.github_branch + "/tool/" + currentpage.template %}
{% else %}
{% set githuburl = "https://github.com/ripple/ripple-dev-portal/" %}
{% endif %}