gitness
gitness copied to clipboard
Enhance status check label for promotions
This PR introduces a change for labels applied to status checks related to promotions, actually a generic one is used.
hi @bradrydzewski, we would like to use this change asap, could you drop a review? :pray:
I had a look at the change, and this seems to be additive so it shouldnt affect any existing functionality. I will defer to Brad, as i have not looked at the lifecycle of statuses in depth
hi @tphoney, any feedback from @bradrydzewski? 🙏
@tphoney @bradrydzewski bump
The deploy
value is freeform and may contain special characters, spaces, etc. @tphoney do we know that all providers (github, gitlab, gitea, bitbucket, stash, azure) support freeform text and no character restrictions? If yes, then we are good to merge. If no, I would recommend taking the slug value (using the existing slug library that we already import).
import (
"fmt"
"github.com/drone/drone/core"
"github.com/drone/go-scm/scm"
+ github.com/gosimple/slug
)
case core.EventPromote:
- return fmt.Sprintf("%s/promote/%s", name, deployTo)
+ return fmt.Sprintf("%s/promote/%s", name, slug.Make(deployTo))
The deploy value is freeform and may contain special characters, spaces, etc. @tphoney do we know that all providers (github, gitlab, gitea, bitbucket, stash, azure) support freeform text and no character restrictions? If yes, then we are good to merge. If no, I would recommend taking the slug value (using the existing slug library that we already import).
hey @bradrydzewski, I think your suggestion is reasonable even if may there are no special character, better safe than sorry :smile:
Any update on this?