github / gh-gei

Migration CLI for GitHub to GitHub migrations
MIT License
300 stars 80 forks source link

`rewire-pipeline` Command Switches YAML Triggers #1237

Open connorstorer-kbxcom opened 2 months ago

connorstorer-kbxcom commented 2 months ago

Description

After running the rewire-pipeline against an ADO YAML pipeline, the pipeline options/triggers have been changed unexpectedly. Curling the definition content it looks like the rewire-pipeline command removes the pipeline definition triggers object and instead populates it with options (mine didn't have options before anyway). After manually unchecking the Override the YAML continuous integration trigger from here checkbox and curling the definition, the triggers object is repopulated.

image

After Running Command: image

After Manually Reverting/Unchecking: image

Reproduction Steps

Run the rewire-pipeline command against an ADO YAML pipeline without any explicit pipeline definition trigger overrides. After running the command, edit the pipeline in ADO and navigate to the triggers. Notice the Override the YAML continuous integration trigger from here checkbox is checked.

tjolliff commented 1 month ago

Also seeing similar behavior.

connorstorer-kbxcom commented 1 month ago

Wondering if this is the intended functionality & assumption that YAML pipelines would be using pr within their yaml? https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/pr?view=azure-pipelines#remarks image

tjolliff commented 1 month ago

I tested out adding the pr section to the yaml file before rewiring the pipeline and got the same result :( Here were the steps I followed:

connorstorer-kbxcom commented 1 month ago

I would expect it to still be overridden, but does a PR to github repo automatically kick off ADO pipeline?

EDIT: Oh nevermind, that should be default.