Ecma262: Meta: auto-link the PR preview

Created on 25 Feb 2020  路  6Comments  路  Source: tc39/ecma262

Pull requests automatically render a version of the spec with the PR incorporated, but the link is not exactly discoverable. (Click 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 this animation is an animation of how to find it, incidentally.)

I was going to go with a redirect page based on document.referrer, but Safari is breaking document.referrer. So we should do something else.

Options include:

  • Do nothing
  • The above approach, which will just be broken for some fraction of visitors
  • Instead of having a link to the redirect page, just add a blurb to the PR template about how to find the preview
  • In the PR template, ask people to edit the link in manually
  • Have a bot which edits the OP of any new PR with a link to the preview
  • Have a bot which leaves a comment on any new PR with a link to the preview

Thoughts?

Most helpful comment

Personally I lean towards the last of these. I am pretty opposed to anything which requires more of anyone than clicking an obvious link, which only the last two approaches achieve, and I don't like bots which edit people's comments.

All 6 comments

Personally I lean towards the last of these. I am pretty opposed to anything which requires more of anyone than clicking an obvious link, which only the last two approaches achieve, and I don't like bots which edit people's comments.

prs to the html spec are automatically edited by a bot, and it works pretty nicely imo.

I think any of the last three would be good. Might be worth doing the 4th option (adding to the template) for now, and then working on a more automated solution while that's in place.

We could ask GitHub for a way to interpolate the current PR/issue number into messages.

I also really like the idea of asking GH for such a feature. A preview rendering link seems valuable for all repos working on documents.

Until then, I feel like asking people to edit the link is fine as the least intrusive, lowest effort thing to do until GH gives us an answer.

We can use a bot to post the link when it's ready. Or through CI build step. 馃

Was this page helpful?
0 / 5 - 0 ratings