-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f1d9d1
commit 6fd6220
Showing
4 changed files
with
46 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 19 additions & 22 deletions
41
unison-src/transcripts/idempotent/api-list-projects-branches.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,69 @@ | ||
# List Projects And Branches Test | ||
|
||
``` ucm :hide | ||
scratch/main> project.create-empty project-one | ||
scratch/main> project.create-empty project-apple | ||
scratch/main> project.create-empty project-two | ||
scratch/main> project.create-empty project-banana | ||
scratch/main> project.create-empty project-three | ||
scratch/main> project.create-empty project-cherry | ||
project-one/main> branch branch-one | ||
project-apple/main> branch branch-apple | ||
project-one/main> branch branch-two | ||
project-apple/main> branch branch-banana | ||
project-one/main> branch branch-three | ||
project-apple/main> branch branch-cherry | ||
``` | ||
|
||
``` api | ||
-- Should list all projects | ||
GET /api/projects | ||
[ | ||
{ | ||
"activeBranchRef": "branch-three", | ||
"projectName": "project-one" | ||
"activeBranchRef": "branch-cherry", | ||
"projectName": "project-apple" | ||
}, | ||
{ | ||
"activeBranchRef": "main", | ||
"projectName": "project-three" | ||
"projectName": "project-banana" | ||
}, | ||
{ | ||
"activeBranchRef": "main", | ||
"projectName": "project-two" | ||
"projectName": "project-cherry" | ||
}, | ||
{ | ||
"activeBranchRef": "main", | ||
"projectName": "scratch" | ||
} | ||
] | ||
-- Can query for some infix of the project name | ||
GET /api/projects?query=thre | ||
GET /api/projects?query=bana | ||
[ | ||
{ | ||
"activeBranchRef": "main", | ||
"projectName": "project-three" | ||
"projectName": "project-banana" | ||
} | ||
] | ||
-- Should list all branches | ||
GET /api/projects/project-one/branches | ||
GET /api/projects/project-apple/branches | ||
[ | ||
{ | ||
"branchName": "branch-one" | ||
"branchName": "branch-apple" | ||
}, | ||
{ | ||
"branchName": "branch-three" | ||
"branchName": "branch-banana" | ||
}, | ||
{ | ||
"branchName": "branch-two" | ||
"branchName": "branch-cherry" | ||
}, | ||
{ | ||
"branchName": "main" | ||
} | ||
] | ||
-- Should list all branches beginning with branch-t | ||
GET /api/projects/project-one/branches?prefix=branch-t | ||
-- Can query for some infix of the project name | ||
GET /api/projects/project-apple/branches?query=bana | ||
[ | ||
{ | ||
"branchName": "branch-three" | ||
}, | ||
{ | ||
"branchName": "branch-two" | ||
"branchName": "branch-banana" | ||
} | ||
] | ||
``` |