| name | onenote-ci-integration |
| description | Set up CI/CD pipelines for OneNote integrations with Graph API testing and mock strategies.
Use when configuring GitHub Actions, setting up test credentials, or building mock-based CI tests.
Trigger with "onenote ci", "onenote github actions", "onenote test pipeline", "graph api ci".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","onenote","microsoft"] |
| compatibility | Designed for Claude Code |
OneNote CI Integration
Overview
Testing OneNote integrations in CI requires Azure AD app registration, credential management, and mock strategies for Graph API responses. This skill provides two proven CI strategies: mock-only PR checks (zero Azure credentials required) and nightly live integration tests with proper credential isolation and rate limit awareness.
Prerequisites
- GitHub Actions or equivalent CI platform
- Node.js 18+ or Python 3.10+
- For mock-only CI: no Azure credentials needed
- For live integration tests: Azure AD test tenant with app registration
- GitHub repository secrets configured (live tests only)
Instructions
Strategy 1: Mock-Only CI (PR Checks)
Use msw (Mock Service Worker) to intercept Graph API calls with zero Azure dependency:
import { http, HttpResponse } from "msw";
const GRAPH = "https://graph.microsoft.com/v1.0";
export const handlers = [
http.get(`${GRAPH}/me/onenote/notebooks`, () =>
HttpResponse.json({ value: [
{ id: "nb-001", displayName: "Work Notes", createdDateTime: "2026-01-15T10:00:00Z" },
]})),
http.get(`${GRAPH}/me/onenote/sections/:sectionId/pages`, () =>
HttpResponse.json({ value: [
{ id: "page-001", title: "Sprint Review", : },
]})),
http.(, ({ request }) => {
body = request.();
(!body.()) {
(.({
: { : , : }
}), { : });
}
.({ : , : }, { : });
}),
];