mirror of
https://github.com/harness/drone.git
synced 2025-05-11 06:30:06 +08:00
Merge pull request #2199 from praxist/repo_label_to_task [ci skip]
Add repo to task labels for build filtering
This commit is contained in:
commit
35ffb27066
@ -322,10 +322,11 @@ func PostHook(c *gin.Context) {
|
|||||||
task := new(queue.Task)
|
task := new(queue.Task)
|
||||||
task.ID = fmt.Sprint(item.Proc.ID)
|
task.ID = fmt.Sprint(item.Proc.ID)
|
||||||
task.Labels = map[string]string{}
|
task.Labels = map[string]string{}
|
||||||
task.Labels["platform"] = item.Platform
|
|
||||||
for k, v := range item.Labels {
|
for k, v := range item.Labels {
|
||||||
task.Labels[k] = v
|
task.Labels[k] = v
|
||||||
}
|
}
|
||||||
|
task.Labels["platform"] = item.Platform
|
||||||
|
task.Labels["repo"] = b.Repo.FullName
|
||||||
|
|
||||||
task.Data, _ = json.Marshal(rpc.Pipeline{
|
task.Data, _ = json.Marshal(rpc.Pipeline{
|
||||||
ID: fmt.Sprint(item.Proc.ID),
|
ID: fmt.Sprint(item.Proc.ID),
|
||||||
|
Loading…
Reference in New Issue
Block a user