mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-30 22:11:07 +00:00 
			
		
		
		
	feat: always publish the link to the commit status (#8177)
See https://codeberg.org/forgejo/forgejo/pulls/4801#issuecomment-5094525 and #8152 for more context. The current implementation is limited to self-hosted actions and buggy as soon as multiple repos are involved, like for the homepage (because each permission must be fetched individually). Ideally this feature should work for all kind of status (with some setting indicating which collaborator can access with status). Probably inside the `git_model.ParseCommitsWithStatus` function. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8177 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: oliverpool <git@olivier.pfad.fr> Co-committed-by: oliverpool <git@olivier.pfad.fr>
This commit is contained in:
		
					parent
					
						
							
								402a85a9b6
							
						
					
				
			
			
				commit
				
					
						09699c1506
					
				
			
		
					 13 changed files with 21 additions and 153 deletions
				
			
		|  | @ -13,10 +13,8 @@ import ( | |||
| 
 | ||||
| 	activities_model "forgejo.org/models/activities" | ||||
| 	"forgejo.org/models/db" | ||||
| 	git_model "forgejo.org/models/git" | ||||
| 	issues_model "forgejo.org/models/issues" | ||||
| 	repo_model "forgejo.org/models/repo" | ||||
| 	"forgejo.org/models/unit" | ||||
| 	"forgejo.org/modules/base" | ||||
| 	"forgejo.org/modules/log" | ||||
| 	"forgejo.org/modules/optional" | ||||
|  | @ -311,11 +309,6 @@ func NotificationSubscriptions(ctx *context.Context) { | |||
| 		ctx.ServerError("GetIssuesAllCommitStatus", err) | ||||
| 		return | ||||
| 	} | ||||
| 	if !ctx.Repo.CanRead(unit.TypeActions) { | ||||
| 		for key := range commitStatuses { | ||||
| 			git_model.CommitStatusesHideActionsURL(ctx, commitStatuses[key]) | ||||
| 		} | ||||
| 	} | ||||
| 	ctx.Data["CommitLastStatus"] = lastStatus | ||||
| 	ctx.Data["CommitStatuses"] = commitStatuses | ||||
| 	ctx.Data["Issues"] = issues | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue