slub
slub copied to clipboard
Custom amount of GTMs needed (+ scoped by squad?)
In the squad I'm working, the GTM policy is "1 GTM is enough".
Therefore, slub is looking for pending PRs with less than 2 GTMs, in SqlPRRepository:
private function fetchPRInReviewNotGTMed(): array
{
$sql = <<<SQL
SELECT IDENTIFIER, GTMS, NOT_GTMS, COMMENTS, CI_STATUS, IS_MERGED, MESSAGE_IDS, PUT_TO_REVIEW_AT, CHANNEL_IDS, WORKSPACE_IDS, AUTHOR_IDENTIFIER, TITLE, CLOSED_AT, IS_TOO_LARGE
FROM pr
WHERE
GTMS < 2
AND IS_MERGED IS FALSE
AND CLOSED_AT IS NULL
;
SQL;
$statement = $this->sqlConnection->executeQuery($sql);
return $statement->fetchAll(\PDO::FETCH_ASSOC);
}
So the team gets reminder of PRs with already 1 GTM, which lead to "false reminders". I think it could be a nice thing to customize the amount of required GTM.
For small companies, this could be as simple as customizing it in the .env file.
To go further: For larger companies, a cool way could be to customize this policy by squad. But this raises more questions:
- how do you know a PR is related to a specific squad
- where do you specify/store this information