forked from forgejo/forgejo
[CLI] implement forgejo-cli actions register (squash) no private
Do not go through the private API, directly modify the database
(cherry picked from commit 1ba7c0d39d
)
This commit is contained in:
parent
902ebcdf3d
commit
ffe4059b38
4 changed files with 21 additions and 55 deletions
|
@ -4,6 +4,7 @@
|
|||
package private
|
||||
|
||||
import (
|
||||
gocontext "context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
@ -64,7 +65,11 @@ func GenerateActionsRunnerToken(ctx *context.PrivateContext) {
|
|||
ctx.PlainText(http.StatusOK, token.Token)
|
||||
}
|
||||
|
||||
func parseScope(ctx *context.PrivateContext, scope string) (ownerID, repoID int64, err error) {
|
||||
func ParseScope(ctx gocontext.Context, scope string) (ownerID, repoID int64, err error) {
|
||||
return parseScope(ctx, scope)
|
||||
}
|
||||
|
||||
func parseScope(ctx gocontext.Context, scope string) (ownerID, repoID int64, err error) {
|
||||
ownerID = 0
|
||||
repoID = 0
|
||||
if scope == "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue