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(
|
||||
"The github_ci MCP server requires 'actions: read' permission. " +
|
||||
"Skipping CI server installation. " +
|
||||
"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",
|
||||
"To enable CI status checks, add 'actions: read' to your workflow permissions " +
|
||||
"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 {
|
||||
baseMcpConfig.mcpServers.github_ci = {
|
||||
|
||||
@ -292,6 +292,9 @@ describe("prepareMcpConfig", () => {
|
||||
|
||||
const parsed = JSON.parse(result);
|
||||
expect(parsed.mcpServers.github_ci).not.toBeDefined();
|
||||
expect(consoleWarningSpy).toHaveBeenCalledWith(
|
||||
expect.stringContaining("Skipping CI server installation"),
|
||||
);
|
||||
|
||||
delete process.env.DEFAULT_WORKFLOW_TOKEN;
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user