isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

Release/0.40.1 #924

Closed alexanderleegs closed 1 year ago

alexanderleegs commented 1 year ago

This PR fixes an issue where our calls to /repos/{owner}/{repo}/commits from the Github API were not referencing the correct branch. This issue was because we were referring to ref, when the expected param is sha. This caused issues for repos where the default branch was mistakenly set to master or any other non staging branch.

See link for api docs.

This is a 2-part solution for resolving IS-501 - we have already run a script to modify the default of all existing repos to ensure they are staging.

Testing:

harishv7 commented 1 year ago

@alexanderleegs Followed the test plan with default branch for repo as master, but repo was still reset to master. Previously it was 200++ commits ahead of master. See the ss below. The behaviour I noticed when renaming a folder was that the spinner on save was spinning perpetually. Screenshot 2023-08-24 at 11 35 42 PM

However, when I retried for 2nd attempt, the rename was successful and the commits went to staging branch without resetting to master

UPDATE: above was tested on staging before the fix was pushed, we have verified that it works on staging after the fix was pushed