diff options
author | HesterG <hestergong@gmail.com> | 2023-05-31 09:39:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-31 09:39:54 +0800 |
commit | 28a89e360f720c5ca7fb71319beb2519adad5972 (patch) | |
tree | 4415e33b9e519bead6b10e3a0605b5d924226292 /models | |
parent | 4c81dae2977b1723330459be754649c6a3080129 (diff) | |
download | gitea-28a89e360f720c5ca7fb71319beb2519adad5972.tar.gz gitea-28a89e360f720c5ca7fb71319beb2519adad5972.zip |
Add user level action runners (#24995)
Used similar logic to organization.
<img width="1437" alt="Screen Shot 2023-05-30 at 10 18 06"
src="https://github.com/go-gitea/gitea/assets/17645053/49f3800a-44ae-4188-b1e6-91d49e3d7868">
<img width="1331" alt="Screen Shot 2023-05-30 at 10 31 18"
src="https://github.com/go-gitea/gitea/assets/17645053/221b2068-e9b9-4e34-bb4a-d390594b2f35">
Diffstat (limited to 'models')
-rw-r--r-- | models/actions/runner.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/models/actions/runner.go b/models/actions/runner.go index f1638eb0ba..bf703c444b 100644 --- a/models/actions/runner.go +++ b/models/actions/runner.go @@ -69,7 +69,11 @@ func (r *ActionRunner) BelongsToOwnerType() types.OwnerType { return types.OwnerTypeRepository } if r.OwnerID != 0 { - return types.OwnerTypeOrganization + if r.Owner.Type == user_model.UserTypeOrganization { + return types.OwnerTypeOrganization + } else if r.Owner.Type == user_model.UserTypeIndividual { + return types.OwnerTypeIndividual + } } return types.OwnerTypeSystemGlobal } |