@@ -94,8 +94,8 @@ func RerunWorkflowRun(ctx *context.APIContext) {
9494	//   required: true 
9595	// - name: run 
9696	//   in: path 
97- 	//   description: run ID or "latest"  
98- 	//   type: string  
97+ 	//   description: run ID 
98+ 	//   type: integer  
9999	//   required: true 
100100	// responses: 
101101	//   "200": 
@@ -169,8 +169,8 @@ func CancelWorkflowRun(ctx *context.APIContext) {
169169	//   required: true 
170170	// - name: run 
171171	//   in: path 
172- 	//   description: run ID or "latest"  
173- 	//   type: string  
172+ 	//   description: run ID 
173+ 	//   type: integer  
174174	//   required: true 
175175	// responses: 
176176	//   "200": 
@@ -265,8 +265,8 @@ func ApproveWorkflowRun(ctx *context.APIContext) {
265265	//   required: true 
266266	// - name: run 
267267	//   in: path 
268- 	//   description: run ID or "latest"  
269- 	//   type: string  
268+ 	//   description: run ID 
269+ 	//   type: integer  
270270	//   required: true 
271271	// responses: 
272272	//   "200": 
@@ -358,8 +358,8 @@ func RerunWorkflowJob(ctx *context.APIContext) {
358358	//   required: true 
359359	// - name: run 
360360	//   in: path 
361- 	//   description: run ID or "latest"  
362- 	//   type: string  
361+ 	//   description: run ID 
362+ 	//   type: integer  
363363	//   required: true 
364364	// - name: job_id 
365365	//   in: path 
@@ -442,19 +442,6 @@ func RerunWorkflowJob(ctx *context.APIContext) {
442442
443443// Helper functions 
444444func  getRunID (ctx  * context.APIContext ) (int64 , * actions_model.ActionRun , error ) {
445- 	// if run param is "latest", get the latest run 
446- 	if  ctx .PathParam ("run" ) ==  "latest"  {
447- 		run , err  :=  actions_model .GetLatestRun (ctx , ctx .Repo .Repository .ID )
448- 		if  err  !=  nil  {
449- 			return  0 , nil , err 
450- 		}
451- 		if  run  ==  nil  {
452- 			return  0 , nil , util .ErrNotExist 
453- 		}
454- 		return  run .ID , run , nil 
455- 	}
456- 
457- 	// Otherwise get run by ID 
458445	runID  :=  ctx .PathParamInt64 ("run" )
459446	run , has , err  :=  db .GetByID [actions_model.ActionRun ](ctx , runID )
460447	if  err  !=  nil  {
@@ -584,8 +571,8 @@ func GetWorkflowRunLogs(ctx *context.APIContext) {
584571	//   required: true 
585572	// - name: run 
586573	//   in: path 
587- 	//   description: run ID or "latest"  
588- 	//   type: string  
574+ 	//   description: run ID 
575+ 	//   type: integer  
589576	//   required: true 
590577	// responses: 
591578	//   "200": 
@@ -631,8 +618,8 @@ func GetWorkflowJobLogs(ctx *context.APIContext) {
631618	//   required: true 
632619	// - name: run 
633620	//   in: path 
634- 	//   description: run ID or "latest"  
635- 	//   type: string  
621+ 	//   description: run ID 
622+ 	//   type: integer  
636623	//   required: true 
637624	// - name: job_id 
638625	//   in: path 
@@ -703,8 +690,8 @@ func GetWorkflowRunLogsStream(ctx *context.APIContext) {
703690	//   required: true 
704691	// - name: run 
705692	//   in: path 
706- 	//   description: run ID or "latest"  
707- 	//   type: string  
693+ 	//   description: run ID 
694+ 	//   type: integer  
708695	//   required: true 
709696	// - name: job 
710697	//   in: query 
0 commit comments