vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Name the job's bot account with acts-as
ac541b268df7626894acdb3405a886a0f0d7cc4a · Keenan Nemetz · 6d ago · parent 57dc79af
Name the job's bot account with acts-as The field was `bot`, the same word as the account kind, so the YAML said "bot: coding-agent" and the reference page had to explain that the job acts as that account. The key now says what it does: `acts-as: coding-agent`. Nothing else moves. A bot is still a bot: `--bot`, the directory and profile badge, the kind column, and the accounts page all keep the word. The job model still calls the account Bot, because that is what it is. There is no alias. Unknown keys already fail the parse, the field has not shipped in a release, and this repository has no tags, so a second spelling would outlive the only reason to have one. A test pins the old key as rejected.
ci/workflow_test.go +14−9
| @@ -540,15 +540,15 @@ jobs: | |||
| 540 | 540 | } | |
| 541 | 541 | } | |
| 542 | 542 | ||
| 543 | // bot names the account a job acts as. The name is checked at push and the account | ||
| 544 | // itself when the job is leased, because a roster changes without a push. | ||
| 545 | func TestJobBotIsParsedAndValidated(t *testing.T) { | ||
| 543 | // acts-as names the bot account a job acts as. The name is checked at push and the | ||
| 544 | // account itself when the job is leased, because a roster changes without a push. | ||
| 545 | func TestJobActsAsIsParsedAndValidated(t *testing.T) { | ||
| 546 | 546 | t.Parallel() | |
| 547 | 547 | wf, problems := Parse("ci.yaml", `version: 1 | |
| 548 | 548 | jobs: | |
| 549 | 549 | agent: | |
| 550 | 550 | image: alpine:3.22 | |
| 551 | bot: coding-agent | ||
| 551 | acts-as: coding-agent | ||
| 552 | 552 | steps: | |
| 553 | 553 | - run: true | |
| 554 | 554 | `) | |
| @@ -556,17 +556,22 @@ jobs: | |||
| 556 | 556 | t.Fatalf("problems: %v", problems) | |
| 557 | 557 | } | |
| 558 | 558 | if got := wf.Jobs[0].Bot; got != "coding-agent" { | |
| 559 | t.Fatalf("bot = %q", got) | ||
| 559 | t.Fatalf("acts-as = %q", got) | ||
| 560 | 560 | } | |
| 561 | 561 | for _, bad := range []string{"Coding-Agent", "a", "not an account", "bot!"} { | |
| 562 | src := "version: 1\njobs:\n agent:\n image: alpine:3.22\n bot: " + strconv.Quote(bad) + | ||
| 562 | src := "version: 1\njobs:\n agent:\n image: alpine:3.22\n acts-as: " + strconv.Quote(bad) + | ||
| 563 | 563 | "\n steps:\n - run: true\n" | |
| 564 | 564 | if _, problems := Parse("ci.yaml", src); len(problems) == 0 { | |
| 565 | t.Fatalf("bot %q was accepted", bad) | ||
| 566 | } else if !strings.Contains(strings.Join(problems, " "), "bot") { | ||
| 567 | t.Fatalf("the problem does not name bot: %v", problems) | ||
| 565 | t.Fatalf("acts-as %q was accepted", bad) | ||
| 566 | } else if !strings.Contains(strings.Join(problems, " "), "acts-as") { | ||
| 567 | t.Fatalf("the problem does not name acts-as: %v", problems) | ||
| 568 | 568 | } | |
| 569 | 569 | } | |
| 570 | // The field was named `bot` before the account kind had a label of its own, so | ||
| 571 | // the old spelling is rejected rather than quietly accepted: one key, one way. | ||
| 572 | if _, problems := Parse("ci.yaml", "version: 1\njobs:\n agent:\n image: alpine:3.22\n bot: coding-agent\n steps:\n - run: true\n"); len(problems) == 0 { | ||
| 573 | t.Fatal("the old bot key was accepted") | ||
| 574 | } | ||
| 570 | 575 | // A workflow cannot replace the variables that point at the credential. | |
| 571 | 576 | src := `version: 1 | |
| 572 | 577 | jobs: | |