fix: address review feedback - assert warning in test and improve guidance in warning message
This commit is contained in:
parent
a3fea12aea
commit
66d04425ea
@ -178,8 +178,9 @@ export async function prepareMcpConfig(
|
|||||||
core.warning(
|
core.warning(
|
||||||
"The github_ci MCP server requires 'actions: read' permission. " +
|
"The github_ci MCP server requires 'actions: read' permission. " +
|
||||||
"Skipping CI server installation. " +
|
"Skipping CI server installation. " +
|
||||||
"To enable CI status checks, add 'actions: read' to your workflow permissions. " +
|
"To enable CI status checks, add 'actions: read' to your workflow permissions " +
|
||||||
"See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token",
|
"and set 'additional_permissions: actions: read' in the action's with: inputs. " +
|
||||||
|
"See: https://github.com/anthropics/claude-code-action/blob/main/docs/configuration.md#additional-permissions-for-cicd-integration",
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
baseMcpConfig.mcpServers.github_ci = {
|
baseMcpConfig.mcpServers.github_ci = {
|
||||||
|
|||||||
@ -292,6 +292,9 @@ describe("prepareMcpConfig", () => {
|
|||||||
|
|
||||||
const parsed = JSON.parse(result);
|
const parsed = JSON.parse(result);
|
||||||
expect(parsed.mcpServers.github_ci).not.toBeDefined();
|
expect(parsed.mcpServers.github_ci).not.toBeDefined();
|
||||||
|
expect(consoleWarningSpy).toHaveBeenCalledWith(
|
||||||
|
expect.stringContaining("Skipping CI server installation"),
|
||||||
|
);
|
||||||
|
|
||||||
delete process.env.DEFAULT_WORKFLOW_TOKEN;
|
delete process.env.DEFAULT_WORKFLOW_TOKEN;
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user