mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 02:20:38 +09:00
Support routine variables in titles
This commit is contained in:
parent
372421ef0b
commit
1de5fb9316
7 changed files with 41 additions and 17 deletions
|
|
@ -12,9 +12,18 @@ describe("routine variable helpers", () => {
|
|||
).toEqual(["repo", "priority"]);
|
||||
});
|
||||
|
||||
it("deduplicates placeholder names across the routine title and description", () => {
|
||||
expect(
|
||||
extractRoutineVariableNames([
|
||||
"Triage {{repo}}",
|
||||
"Review {{repo}} for {{priority}} bugs",
|
||||
]),
|
||||
).toEqual(["repo", "priority"]);
|
||||
});
|
||||
|
||||
it("preserves existing metadata when syncing variables from a template", () => {
|
||||
expect(
|
||||
syncRoutineVariablesWithTemplate("Review {{repo}} and {{priority}}", [
|
||||
syncRoutineVariablesWithTemplate(["Triage {{repo}}", "Review {{repo}} and {{priority}}"], [
|
||||
{ name: "repo", label: "Repository", type: "text", defaultValue: "paperclip", required: true, options: [] },
|
||||
]),
|
||||
).toEqual([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue