test PRs against base ref

rather than making assumptions about checkouts and origins
This commit is contained in:
Min RK
2023-04-19 15:56:09 +02:00
parent cfc27db43d
commit 203f4a5855
2 changed files with 3 additions and 2 deletions

View File

@@ -82,9 +82,10 @@ jobs:
# git references, and forks can be outdated, we only run these steps when # git references, and forks can be outdated, we only run these steps when
# working against jupyterhub/jupyterhub to avoid incorrectly erroring # working against jupyterhub/jupyterhub to avoid incorrectly erroring
- name: check redirects for this PR - name: check redirects for this PR
if: github.repository == 'jupyterhub/jupyterhub' if: ${{ github.event_name == 'pull_request' }}
run: | run: |
cd docs cd docs
export REDIRAFFE_BRANCH=${{ github.base_ref }}
make rediraffecheckdiff make rediraffecheckdiff
# this should check currently published 'stable' links for redirects # this should check currently published 'stable' links for redirects

View File

@@ -235,7 +235,7 @@ ogp_use_first_image = True
# If you are basing changes off another branch/ commit, always change back # If you are basing changes off another branch/ commit, always change back
# rediraffe_branch to main before pushing your changes upstream. # rediraffe_branch to main before pushing your changes upstream.
# #
rediraffe_branch = os.environ.get("REDIRAFFE_BRANCH", "origin/main") rediraffe_branch = os.environ.get("REDIRAFFE_BRANCH", "main")
rediraffe_redirects = "redirects.txt" rediraffe_redirects = "redirects.txt"
# allow 80% match for autogenerated redirects # allow 80% match for autogenerated redirects