ansible-documentation icon indicating copy to clipboard operation
ansible-documentation copied to clipboard

Enhancement for Github workflow for releasing the porting guide

Open anweshadas opened this issue 4 months ago • 4 comments

If/when the proposed github action workflow (as discussed in here for generating the Porting Guide is restarted and working (release) branch gets a new commit, then the PR should be turned into a draft again, and somebody has to undraft it. Which means that if we run workflow, resulting in a new commit, for the 2nd time it will put the PR back into draft state.

To clarify if/when we run the workflow for the second time, (on the same branch against the first workflow ran), and we already have a PR (created by the first workflow) un-drafted (manually by clicking on ready to review box on Github CLI ) , in this circumstances the 2nd workflow will fail. It is going to fail while trying to push the commit to the same branch on Github.

I tested the same here

Image

This particular enhancement feature will provide the workflow to be more robust.

@webknjaz

anweshadas avatar Jul 08 '25 08:07 anweshadas

It is going to fail while trying to push the commit to the same branch on Github.

Well, you can either add a commit on top, so the branch doesn't diverge, or you could force-push, assuming no commits are added by humans on top.

Which means that if we run workflow, resulting in a new commit, for the 2nd time it will put the PR back into draft state.

This won't happen automatically, you have to add a GH CLI invocation to do that on the existing PR instead of attempting to create a PR. You can't create a new PR from the same branch without first closing the previous one. A branch cannot be linked to two PRs in the same repo, GH won't let you.

webknjaz avatar Jul 09 '25 15:07 webknjaz

Thank you for explanation. I wonder if anyone have any preferred choices.

anweshadas avatar Jul 14 '25 21:07 anweshadas

Another enhancement: adding the right backport-X.Y labels to the PR.

Right now someone has to do this manually.

felixfontein avatar Jul 15 '25 15:07 felixfontein

Like the label addition. As for which approach to take for the second commit, we discussed this in the DaWGs meeting today and the consensus is to add a commit on top.

samccann avatar Jul 15 '25 15:07 samccann