fix: always add branch in gh pages changes#450
Conversation
|
The PR looks good, however as I noted, in order to get rid of these special cases, one could apply the expected configuration all the time a change is detected, see for example repo secrets (where you are always forced to pass the secret value): https://github.com/eclipse-csi/otterdog/blob/main/otterdog/models/repo_secret.py#L67 I was starting with the logic to have only a minimal set of changes to be applied, but the GH API has some quirks like this case, and you we can discuss whether it is worth to always apply workarounds this these cases, or just accept that in some rare cases unnecessary update calls might get triggered. |
|
so I would be careful to make a similar fix in 2 different places now, so I would also refactor the existing hack to the same place imho. |
I'm moving them to this block in other to avoid diff with unchanged items. |
applying changes to gh pages always requires the source branch in the payload. this change make sure that source branch is always added Signed-off-by: Kairo Araujo <kairo@dearaujo.nl>
|
Hi @netomi, Let me know if this approach looks better. If it looks ok, I will them
|
Signed-off-by: Kairo Araujo <kairo@dearaujo.nl>
Signed-off-by: Kairo Araujo <kairo@dearaujo.nl>
|
I added UT, actually with UT I found a small bug that is fixed. While adding the UT I did a little refactoring for using pytest fixture, so I can use the pytest.mark.parametrize and we will be able to extend test to other parts and use stub. If all good I will come with a follow up PR adding the squash commit settings once it this one is merged. |
applying changes to gh pages always requires the source branch in the payload.
this change make sure that source branch is always added
closes #245