mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-11-01 15:01:03 +00:00
[CLI] implement forgejo-cli actions
(cherry picked from commit08be2b226e) (cherry picked from commitb6cfa88c6e) (cherry picked from commit59704200de) [CLI] implement forgejo-cli actions generate-secret (cherry picked from commit6f7905c8ec) (cherry picked from commite085d6d273) [CLI] implement forgejo-cli actions generate-secret (squash) NoInit (cherry picked from commit962c944eb2) [CLI] implement forgejo-cli actions register (cherry picked from commit2f95143000) (cherry picked from commit42f2f8731e) [CLI] implement forgejo-cli actions register (squash) no private Do not go through the private API, directly modify the database (cherry picked from commit1ba7c0d39d) [CLI] implement forgejo-cli actions (cherry picked from commit6f7905c8ec) (cherry picked from commite085d6d273) [CLI] implement forgejo-cli actions generate-secret (squash) NoInit (cherry picked from commit962c944eb2) (cherry picked from commit4c121ef022) Conflicts: cmd/forgejo/actions.go tests/integration/cmd_forgejo_actions_test.go (cherry picked from commit36997a48e3) [CLI] implement forgejo-cli actions (squash) restore --version Refs: https://codeberg.org/forgejo/forgejo/issues/1134 (cherry picked from commit9739eb52d8)
This commit is contained in:
parent
af9e7d8e9e
commit
302c4e30ac
10 changed files with 632 additions and 24 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