[ez][HUD] Main page permalink to use sha from page one #5395
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, if you click the permalink button on the second page of HUD https://hud.pytorch.org/hud/pytorch/pytorch/main/2?per_page=100
![image](https://private-user-images.githubusercontent.com/44682903/345533130-2c1a5988-19fe-4473-8457-6e991ebce2bc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzNTI2MTgsIm5iZiI6MTcyMDM1MjMxOCwicGF0aCI6Ii80NDY4MjkwMy8zNDU1MzMxMzAtMmMxYTU5ODgtMTlmZS00NDczLTg0NTctNmU5OTFlYmNlMmJjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDExMzgzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThmNWI5YWZkYTdjNDhjMGE1ODFjZDYwNGJmZWMxNTU2NmEwYjBjNTg4OGEwOTQxMWM3ZDg2MTRhNWM0OTlkNmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.tYWHYU01t0_DDsmzusmUotpkIOQRcMV_uYOpg0qoZYE)
Then the result is https://hud.pytorch.org/hud/pytorch/pytorch/c9dc9887db0deff3ccbebf9b59dcbe79c3bd8a4f/2?per_page=100
Note the difference in the images. This is because the permalink uses the latest commit sha present on the page (c9dc988), but uses the page param (2 in this example).
This PR changes it to use the latest commit sha of the branch on page one, so the new permalink is https://torchci-git-csl-permalinkpage1-fbopensource.vercel.app/hud/pytorch/pytorch/29c68df600e6cb8eb61ccfea57d6aa3685b0a30f/2?per_page=100.
Note that the sha is different and doesn't show up on the original page that we clicked the permalink button on, it's the sha on page 1. The page param is still 2, allowing us to use the prev button.
An alternate solution would to keep the sha the same (the sha on page 2) but change the page param to be 1, but then you would lose use of the prev button