stubCodeReviewUpdate registers the API stubs for updating the code-review skill from repository ID 1 to tree newsha999.
(reg *httpmock.Registry)
| 1557 | // stubCodeReviewUpdate registers the API stubs for updating the code-review |
| 1558 | // skill from repository ID 1 to tree newsha999. |
| 1559 | func stubCodeReviewUpdate(reg *httpmock.Registry) { |
| 1560 | reg.Register( |
| 1561 | httpmock.REST("GET", "repos/monalisa/octocat-skills"), |
| 1562 | httpmock.StringResponse(`{"id": 1}`)) |
| 1563 | reg.Register( |
| 1564 | httpmock.REST("GET", "repos/monalisa/octocat-skills/releases/latest"), |
| 1565 | httpmock.StringResponse(`{"tag_name": "v3.0.0"}`)) |
| 1566 | reg.Register( |
| 1567 | httpmock.REST("GET", "repos/monalisa/octocat-skills/git/ref/tags%2Fv3.0.0"), |
| 1568 | httpmock.StringResponse(`{"object": {"sha": "newcommit789", "type": "commit"}}`)) |
| 1569 | reg.Register( |
| 1570 | httpmock.REST("GET", "repos/monalisa/octocat-skills/git/trees/newcommit789"), |
| 1571 | httpmock.StringResponse(`{"sha": "newcommit789", "tree": [{"path": "skills/code-review/SKILL.md", "type": "blob", "sha": "newblob1"}, {"path": "skills/code-review", "type": "tree", "sha": "newsha999"}, {"path": "skills", "type": "tree", "sha": "treeshaZ"}], "truncated": false}`)) |
| 1572 | reg.Register( |
| 1573 | httpmock.REST("GET", "repos/monalisa/octocat-skills/git/trees/newsha999"), |
| 1574 | httpmock.StringResponse(`{"sha": "newsha999", "tree": [{"path": "SKILL.md", "type": "blob", "sha": "newblob1", "size": 20}], "truncated": false}`)) |
| 1575 | reg.Register( |
| 1576 | httpmock.REST("GET", "repos/monalisa/octocat-skills/git/blobs/newblob1"), |
| 1577 | httpmock.StringResponse(`{"sha": "newblob1", "encoding": "base64", "content": "IyBDb2RlIFJldmlldyBVcGRhdGVk"}`)) |
| 1578 | } |
| 1579 | |
| 1580 | // If the staged contents cannot be installed after the existing entries |
| 1581 | // have already been moved aside, the original skill directory must be |
no test coverage detected