You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
will correctly skip outputting when GITHUB_REPOSITORY="vagrant-libvirt/vagrant-libvirt" while still detecting GITHUB_REPOSITORY="vagrant-libvirt/vagrant-libvirt.github.io"
The text was updated successfully, but these errors were encountered:
electrofelix
added a commit
to electrofelix/pr-preview-action
that referenced
this issue
Apr 22, 2023
When the repository matches the org name, which might be slightly more
common for small OSS projects where the owner wishes to move to using an
org to allow it be managed by other contributors over time, the existing
code will assume this means it is for the org level pages.
Consequently updates to a repo such as vagrant-libvirt/vagrant-libvirt
will have it's preview URL using the org style rather than the
repository style.
This change adjust the matching to limit to only allowing repos of the
name `<org>.github.io` to be presented with the org style gh-pages
preview URL.
Fixes: rossjrw#39
I'm using this action in https://github.com/vagrant-libvirt/vagrant-libvirt, unfortunately because the repo name matches the org name, the current behaviour of identifying repos for updating org gh-pages repos things that previews for the main application which should show up under https://vagrant-libvirt.github.io/vagrant-libvirt/ as though they should appear under https://vagrant-libvirt.github.io/
This can be seen with vagrant-libvirt/vagrant-libvirt#1733 (comment) which indicates the preview should appear as https://vagrant-libvirt.github.io/pr-preview/pr-1733/ when the correct URL is https://vagrant-libvirt.github.io/vagant-libvirt/pr-preview/pr-1733/
It appears this was caused by an improvement to try and generate the correct preview URLs for PRs in repos updating org pages
pr-preview-action/action.yml
Lines 68 to 74 in 2a65292
It appears that the code behaviour is expecting to match the following scenario:
Unfortunately it will also match on the following:
A simple fix should be to skip removal of the dot domain components:
will correctly skip outputting when
GITHUB_REPOSITORY="vagrant-libvirt/vagrant-libvirt"
while still detectingGITHUB_REPOSITORY="vagrant-libvirt/vagrant-libvirt.github.io"
The text was updated successfully, but these errors were encountered: