Skip to content

Handle milestoned and labeled events independently

Warren Gifford requested to merge independent-issue-events into main

Created by: felixfbecker

There was a race condition where if you team-label an issue and milestone it together, both events would get triggered, causing both the milestoned event action run to already have the team label present on the issue and the labeled event action run to already have the milestone present on the issue. This meant that both action runs were posting a Slack message each.

This solves it by only having the milestoned event ever post Slack messages, while both will cause the issue to get added to the project. This means it's not strictly necessary anymore to add the team label to the project to get it added to the board, it's technically also sufficient to just add a matching milestone. Instead of checking for the team label in the milestoned event, this adds a pattern filter for milestones, so that it only applies to ^Insights iteration milestones. This allows decoupling the two events/actions from each other.

TL;DR this should prevent duplicate Slack posts!

Merge request reports

Loading