Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Pages URL Not GHES Friendly #37

Closed
amyschoen opened this issue Feb 5, 2020 · 2 comments · Fixed by #50
Closed

Pages URL Not GHES Friendly #37

amyschoen opened this issue Feb 5, 2020 · 2 comments · Fixed by #50
Assignees
Labels
bug Something isn't working

Comments

@amyschoen
Copy link
Contributor

The pages URL is hard-coded to only work for .com. It needs to be corrected for GHES.

https://github.com/githubtraining/introduction-to-github/blob/master/responses/reminder-delete.md

I don't know the proper variables but it's likely to be something similar to what we do in the scripts for the GitHub for Developers course unless there's a better way that would work for both. The info is being used in one of the earlier steps as {{ pagesUrl }}, but that is passed to the step in question and doesn't seem to persist.

.com: https://${CLASS_ORG}.github.io/${REPO_NAME}
GHES: https://${ROOT_URL}/pages/${CLASS_ORG}/${REPO_NAME}

/cc @crichID @brianamarie @hectorsector @JasonEtco

@amyschoen amyschoen added the bug Something isn't working label Feb 5, 2020
@hectorsector
Copy link
Member

Thanks for the report, @amyschoen! We can grab the URL from the API like we do in the config:

- type: octokit
method: repos.getPages
owner: '%payload.repository.owner.login%'
repo: '%payload.repository.name%'
action_id: pagesUrl
- type: respond
issue: Getting Started with GitHub
with: close-issue.md
data:
pagesUrl: '%actions.pagesUrl.data.html_url%'

@amyschoen
Copy link
Contributor Author

Nice. The variables aren't well published. It'll be nice to not have to bring in changes to the repo every time we upgrade locally.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants