wca-regulations icon indicating copy to clipboard operation
wca-regulations copied to clipboard

Add Action to Move Current Regulations to History

Open FinnIckler opened this issue 1 year ago • 9 comments

This should be triggered before a new regulations cycle. It can be then linked to in the history file

FinnIckler avatar Jan 31 '24 13:01 FinnIckler

This does not include adding a line saying that this version is not the current one, right?

Nevseros avatar Jan 31 '24 17:01 Nevseros

You are right, I'll add that tomorrow

FinnIckler avatar Feb 01 '24 13:02 FinnIckler

https://github.com/thewca/worldcubeassociation.org/blob/regulations-data/regulations/build/regulations/history/official/2023-08-01/index.html.erb it looks like it also wasn't added the last time regulations were cycled!

FinnIckler avatar Feb 01 '24 13:02 FinnIckler

@FinnIckler

it looks like it also wasn't added the last time regulations were cycled!

Because we add regulations on the history page as soon as we announce them (2024-01-01 should be there too now, for example, but I've been lazy) to be able to reference a current regulation with permalink (during investigations, for example).

Is it possible that upon adding a current version to the history the previous version file is edited with the disclaimer, but not the one that's being added? Like I did in these two PRs in total: 8183 and 8283.

Nevseros avatar Feb 02 '24 15:02 Nevseros

The github action can't figure out what the current/previous version is unless you explicitly tell it through an input variable. What we could do is also add the current version to its history folder every time the official branch is updated and then have this action that just inserts the disclaimer for a given version.

FinnIckler avatar Feb 05 '24 09:02 FinnIckler

So I can pick this one up again. What does WRC think about my suggestion about replacing the current regulations in history every time it's updated?

FinnIckler avatar May 22 '24 09:05 FinnIckler

How would the process look like from our side? We just need to update the version file in the history folder?

Nanush7 avatar May 24 '24 12:05 Nanush7

No, the process from your side would just be like now, you push to this repo to the official branch and that would replace both the latest version and the latest version in history. If you then need to add the disclaimer you can run this Action.

~~I am looking into it and I think I can't implement it here, instead the wrc compiler needs to put the current files into the history folde~~

I can just do it here

FinnIckler avatar Jun 07 '24 12:06 FinnIckler

I added a step to the deploy-to-s3 action that copies the current version into the history. When you cycle regulations you just need to:

  • use the cycle-regulations actions to add the This is NOT the current official version in there with the version you want to add it to as the input parameter
  • Make a PR to the Main Repo to add a link to the new History file

FinnIckler avatar Jun 10 '24 13:06 FinnIckler