Skip to content

flowey: add ADO trigger for tags #1272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

benhillis
Copy link
Member

This change introduces the ability to trigger pipelines when tags are created. While developing this change I also noticed that the current ADO CI triggers functionality did not generate correct yaml when an empty vector of trigger branches is specified, so a fix for that issue is included as well.

@benhillis benhillis requested a review from a team as a code owner May 1, 2025 00:00
@@ -87,7 +97,10 @@ pub enum CiTrigger {
#[serde(rename_all = "camelCase")]
Some {
batch: bool,
branches: TriggerBranches,
#[serde(skip_serializing_if = "Option::is_none")]
branches: Option<TriggerBranches>,
Copy link
Member Author

@benhillis benhillis May 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue here was if branches was empty, the generated yml would get an entry that looked like

trigger:
  branches: {}

which is not valid yml.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth investigating if that's an issue with the yaml crate being used. Sounds like a upstream bug

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is an issue with the yaml crate, seems like this is a valid fix to omit empty elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants