You've already forked woodpecker
							
							
				mirror of
				https://github.com/woodpecker-ci/woodpecker.git
				synced 2025-10-30 23:27:39 +02:00 
			
		
		
		
	Add repo to task labels for build filtering
Add generated labels after user-defined labels to prevent tampering
This commit is contained in:
		| @@ -322,10 +322,11 @@ func PostHook(c *gin.Context) { | ||||
| 		task := new(queue.Task) | ||||
| 		task.ID = fmt.Sprint(item.Proc.ID) | ||||
| 		task.Labels = map[string]string{} | ||||
| 		task.Labels["platform"] = item.Platform | ||||
| 		for k, v := range item.Labels { | ||||
| 			task.Labels[k] = v | ||||
| 		} | ||||
| 		task.Labels["platform"] = item.Platform | ||||
| 		task.Labels["repo"] = b.Repo.FullName | ||||
|  | ||||
| 		task.Data, _ = json.Marshal(rpc.Pipeline{ | ||||
| 			ID:      fmt.Sprint(item.Proc.ID), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user