"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "service/status/util.go" between
drone-2.15.0.tar.gz and drone-2.16.0.tar.gz

About: Drone is a Continuous Delivery system built on (docker) container technology.

util.go  (drone-2.15.0):util.go  (drone-2.16.0)
skipping to change at line 22 skipping to change at line 22
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
package status package status
import ( import (
"fmt" "fmt"
"github.com/drone/drone/core" "github.com/drone/drone/core"
"github.com/drone/go-scm/scm" "github.com/drone/go-scm/scm"
"github.com/gosimple/slug"
) )
func createLabel(name, event string) string { func createLabel(name, event, deployTo string) string {
if name == "" { if name == "" {
name = "continuous-integration/drone" name = "continuous-integration/drone"
} }
switch event { switch event {
case core.EventPush: case core.EventPush:
return fmt.Sprintf("%s/push", name) return fmt.Sprintf("%s/push", name)
case core.EventPullRequest: case core.EventPullRequest:
return fmt.Sprintf("%s/pr", name) return fmt.Sprintf("%s/pr", name)
case core.EventTag: case core.EventTag:
return fmt.Sprintf("%s/tag", name) return fmt.Sprintf("%s/tag", name)
case core.EventPromote:
return fmt.Sprintf("%s/promote/%s", name, slug.Make(deployTo))
default: default:
return name return name
} }
} }
func createDesc(state string) string { func createDesc(state string) string {
switch state { switch state {
case core.StatusBlocked: case core.StatusBlocked:
return "Build is pending approval" return "Build is pending approval"
case core.StatusDeclined: case core.StatusDeclined:
 End of changes. 3 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)