New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta: add HTML page for pull request redirects #1882
Conversation
If it doesn't work, you can get there yourself by clicking the "Show all checks" at the bottom of the pull request, then clicking the "details" link next to the "netlify/ecma262-snapshots/deploy-preview" check, as in <a href="https://cdn.netlify.com/f0b93f3003d5669924b6e73540bbfe07bc3d8d95/34c5d/img/blog/deploy-preview-workflow.gif">this animation</a>. | ||
</p> | ||
<script> | ||
var match = /^https:\/\/github\.com\/tc39\/ecma262\/pull\/(\d+)/.exec(document.referrer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, Safari's ITP is gonna break this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we made a little script that edits the proper link into the pr description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This blog post says this only happens when "the referrer has link decoration", which I think shouldn't be a problem here (since github URLs do not tend to be decorated). Is that not the whole picture?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devsnek I'm not really a fan of editing other people's comments, even with a bot, but I guess that would be acceptable if this doesn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s more recent: https://webkit.org/blog/9661/preventing-tracking-prevention-tracking/
We could just have a bit that comments on the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm definitely not a fan of a comment bot.
If Safari's going to break this, this probably isn't a viable approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well that sucks.
Opened #1883 for further discussion. I'm going to close this for now.
This adds an HTML page for redirecting to the netlify snapshot of the spec on each PR, and a link in the pull request template to that page.
I am pretty confident that the HTML itself works, but I'm not confident that it will get copied to the right place. Unfortunately there's no good way to test it short of landing this PR.
Obviously this link won't work yet, but it will look like:
View the specification with this PR included.