You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-07-12 22:21:40 +02:00
Don't expose task data via api (#4108)
This commit is contained in:
@ -5064,12 +5064,6 @@ const docTemplate = `{
|
|||||||
"agent_id": {
|
"agent_id": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"data": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "integer"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dep_status": {
|
"dep_status": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
|
@ -22,7 +22,7 @@ import (
|
|||||||
// Task defines scheduled pipeline Task.
|
// Task defines scheduled pipeline Task.
|
||||||
type Task struct {
|
type Task struct {
|
||||||
ID string `json:"id" xorm:"PK UNIQUE 'id'"`
|
ID string `json:"id" xorm:"PK UNIQUE 'id'"`
|
||||||
Data []byte `json:"data" xorm:"LONGBLOB 'data'"`
|
Data []byte `json:"-" xorm:"LONGBLOB 'data'"`
|
||||||
Labels map[string]string `json:"labels" xorm:"json 'labels'"`
|
Labels map[string]string `json:"labels" xorm:"json 'labels'"`
|
||||||
Dependencies []string `json:"dependencies" xorm:"json 'dependencies'"`
|
Dependencies []string `json:"dependencies" xorm:"json 'dependencies'"`
|
||||||
RunOn []string `json:"run_on" xorm:"json 'run_on'"`
|
RunOn []string `json:"run_on" xorm:"json 'run_on'"`
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
export interface Task {
|
export interface Task {
|
||||||
id: number;
|
id: number;
|
||||||
data: string;
|
|
||||||
labels: { [key: string]: string };
|
labels: { [key: string]: string };
|
||||||
dependencies: string[];
|
dependencies: string[];
|
||||||
dep_status: { [key: string]: string };
|
dep_status: { [key: string]: string };
|
||||||
|
@ -432,7 +432,6 @@ func TestClient_AgentTasksList(t *testing.T) {
|
|||||||
expected: []*Task{
|
expected: []*Task{
|
||||||
{
|
{
|
||||||
ID: "4696",
|
ID: "4696",
|
||||||
Data: []byte{},
|
|
||||||
Labels: map[string]string{
|
Labels: map[string]string{
|
||||||
"platform": "linux/amd64",
|
"platform": "linux/amd64",
|
||||||
"repo": "woodpecker-ci/woodpecker",
|
"repo": "woodpecker-ci/woodpecker",
|
||||||
@ -440,7 +439,6 @@ func TestClient_AgentTasksList(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "4697",
|
ID: "4697",
|
||||||
Data: []byte{},
|
|
||||||
Labels: map[string]string{
|
Labels: map[string]string{
|
||||||
"platform": "linux/arm64",
|
"platform": "linux/arm64",
|
||||||
"repo": "woodpecker-ci/woodpecker",
|
"repo": "woodpecker-ci/woodpecker",
|
||||||
|
@ -50,7 +50,6 @@ func TestClient_QueueInfo(t *testing.T) {
|
|||||||
Running: []Task{
|
Running: []Task{
|
||||||
{
|
{
|
||||||
ID: "4696",
|
ID: "4696",
|
||||||
Data: []byte{},
|
|
||||||
Labels: map[string]string{
|
Labels: map[string]string{
|
||||||
"platform": "linux/amd64",
|
"platform": "linux/amd64",
|
||||||
"repo": "woodpecker-ci/woodpecker",
|
"repo": "woodpecker-ci/woodpecker",
|
||||||
|
@ -246,7 +246,6 @@ type (
|
|||||||
// Task is the JSON data for a task.
|
// Task is the JSON data for a task.
|
||||||
Task struct {
|
Task struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Data []byte `json:"data"`
|
|
||||||
Labels map[string]string `json:"labels"`
|
Labels map[string]string `json:"labels"`
|
||||||
Dependencies []string `json:"dependencies"`
|
Dependencies []string `json:"dependencies"`
|
||||||
RunOn []string `json:"run_on"`
|
RunOn []string `json:"run_on"`
|
||||||
|
Reference in New Issue
Block a user