320ab7ed7f
This commit allows the `forgejo-cli actions register` command to change an existing runner's secret, as discussed in #4610. It refactors `RegisterRunner` to extract the code that hashes the token, moving this code to a method called `UpdateSecret` on `ActionRunner`. A test for the method has been added. The `RegisterRunner` function is updated so that: - it relies on `ActionRunner.UpdateSecret` when creating new runners, - it checks whether an existing runner's secret still matches the one passed on the command line, - it updates the runner's secret if it wasn't created and it no longer matches. A test has been added for the new behaviour. |
||
---|---|---|
.. | ||
actions | ||
activities | ||
admin | ||
asymkey | ||
auth | ||
avatars | ||
db | ||
dbfs | ||
fixtures | ||
forgefed | ||
forgejo/semver | ||
forgejo_migrations | ||
git | ||
issues | ||
migrations | ||
organization | ||
packages | ||
perm | ||
project | ||
pull | ||
repo | ||
secret | ||
shared/types | ||
system | ||
unit | ||
unittest | ||
user | ||
webhook | ||
error.go | ||
fixture_generation.go | ||
fixture_test.go | ||
main_test.go | ||
org.go | ||
org_team.go | ||
org_team_test.go | ||
org_test.go | ||
repo.go | ||
repo_test.go | ||
repo_transfer.go | ||
repo_transfer_test.go |