Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Run `pnpm format`, `pnpm lint`, `pnpm typecheck`, `pnpm schema:check`, `pnpm tes

## GitHub Packages access

`@commercekit-tools/notification-contract` is pinned to `0.0.2`. The committed `.npmrc` contains only the scoped registry. Configure a classic GitHub PAT with `read:packages` in your user-level npm configuration, or supply `NODE_AUTH_TOKEN` through an external npm auth configuration. Never commit credentials or add a long-lived PAT repository secret.
`@commercekit-tools/notification-contract` is pinned to `0.0.3`. The committed `.npmrc` contains only the scoped registry. Configure a classic GitHub PAT with `read:packages` in your user-level npm configuration, or supply `NODE_AUTH_TOKEN` through an external npm auth configuration. Never commit credentials or add a long-lived PAT repository secret.

```sh
npm login --scope=@commercekit-tools --registry=https://npm.pkg.github.com --auth-type=legacy
pnpm view @commercekit-tools/notification-contract@0.0.2 version --registry=https://npm.pkg.github.com
pnpm view @commercekit-tools/notification-contract@0.0.3 version --registry=https://npm.pkg.github.com
pnpm install --frozen-lockfile
```

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The Action performs no CCv2 API calls, build/deployment work, CLI checks, projec

## Shared event contract

NotificationEvent v1 is supplied by `@commercekit-tools/notification-contract`, pinned to **0.0.2** from GitHub Packages and bundled into `dist/index.js`. Workflow users do not install the package or authenticate to GitHub Packages. Maintainers need package read access to install development dependencies; see [Contributing](CONTRIBUTING.md).
NotificationEvent v1 is supplied by `@commercekit-tools/notification-contract`, pinned to **0.0.3** from GitHub Packages and bundled into `dist/index.js`. Workflow users do not install the package or authenticate to GitHub Packages. Maintainers need package read access to install development dependencies; see [Contributing](CONTRIBUTING.md).

Notify owns presentation templates, Slack/Teams rendering and escaping, webhook policies, delivery, retries, and Action inputs/outputs. Package SemVer, event `schemaVersion`, and Action releases evolve independently. Notify remains unreleased. See the [migration compatibility notes](docs/shared-contract-migration.md).

Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Action release version (`v1.0.0`) and NotificationEvent schema version (`1`)

**Release hold:** Do not tag, create a GitHub Release, or publish this Action to Marketplace until the separate `commercekit-tools/ccv2-build` and `commercekit-tools/ccv2-deploy` Actions are built and their NotificationEvent v1 outputs have been validated with this notifier. This is a product release gate; the two producer Actions remain separate repositories and releases.

The Action bundles `@commercekit-tools/notification-contract@0.0.2` and its runtime dependencies. Package SemVer is independent of NotificationEvent `schemaVersion`. Maintainers and preflight CI need GitHub Packages read access as described in [Contributing](CONTRIBUTING.md); workflow users and manual provider smoke use the committed bundle without registry access. Package publication does not release this Action.
The Action bundles `@commercekit-tools/notification-contract@0.0.3` and its runtime dependencies. Package SemVer is independent of NotificationEvent `schemaVersion`. Maintainers and preflight CI need GitHub Packages read access as described in [Contributing](CONTRIBUTING.md); workflow users and manual provider smoke use the committed bundle without registry access. Package publication does not release this Action.

## Release order

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Redaction is defense in depth and does not replace safe producer behavior. See [

Report vulnerabilities through GitHub private vulnerability reporting for this repository when available. Otherwise use GitHub's private security advisory reporting flow. Do not disclose exploit details in public issues.

NotificationEvent v1 parsing and validation are supplied by the bundled `@commercekit-tools/notification-contract@0.0.2`. Notify retains filesystem safety, provider escaping and redaction, webhook URL masking, destination restrictions, timeouts, redirects and delivery policy. Runtime workflow consumers need no registry credentials. Package credentials belong only in maintainer user configuration or the CI install step; never in repository files or the bundle.
NotificationEvent v1 parsing and validation are supplied by the bundled `@commercekit-tools/notification-contract@0.0.3`. Notify retains filesystem safety, provider escaping and redaction, webhook URL masking, destination restrictions, timeouts, redirects and delivery policy. Runtime workflow consumers need no registry credentials. Package credentials belong only in maintainer user configuration or the CI install step; never in repository files or the bundle.
2 changes: 1 addition & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Third-party notices

The Action's bundled runtime includes `@actions/core` and `@commercekit-tools/notification-contract@0.0.2`, including the contract package's Ajv and `ajv-formats` dependencies. The committed `dist/licenses.txt` contains the license text and notices emitted by `@vercel/ncc` for code incorporated into `dist/index.js`; distribute it with the bundle. `package.json` and `pnpm-lock.yaml` record exact direct and resolved dependencies. Development tools are used to build and validate the Action and are not required by Action consumers.
The Action's bundled runtime includes `@actions/core` and `@commercekit-tools/notification-contract@0.0.3`, including the contract package's Ajv and `ajv-formats` dependencies. The committed `dist/licenses.txt` contains the license text and notices emitted by `@vercel/ncc` for code incorporated into `dist/index.js`; distribute it with the bundle. `package.json` and `pnpm-lock.yaml` record exact direct and resolved dependencies. Development tools are used to build and validate the Action and are not required by Action consumers.

Before each release, regenerate the bundle and review `dist/licenses.txt` for changes alongside dependency updates.
2 changes: 1 addition & 1 deletion docs/notification-event-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Check data may contain mode, changedFrom, filesChecked, errors, warnings, durati

All input is limited to 64 KiB. Strings and arrays have schema bounds. Additive unknown fields are ignored and never rendered; unknown event types and schema versions fail. Additive optional fields preserve v1; changed meaning or removed required fields require a new schema version. Event schema, Action, and producer versions evolve independently.

The machine-readable schema is available through the public `@commercekit-tools/notification-contract/schema` export (JSON import attribute required). Notify pins package version `0.0.2`; package SemVer and event schemaVersion are independent.
The machine-readable schema is available through the public `@commercekit-tools/notification-contract/schema` export (JSON import attribute required). Notify pins package version `0.0.3`; package SemVer and event schemaVersion are independent.

For `check.completed` with `success`, `warning`, or `failure`, `data.filesChecked`, `data.errors`, and `data.warnings` are required non-negative integers. They may be omitted for `cancelled` and `internal-error`. `context.runUrl`, like every event link, must be a bounded HTTPS URL without credentials or fragment. The Action may fill missing context fields from the documented GitHub Actions environment variables; it does not read the full GitHub event payload or copy arbitrary environment values.

Expand Down
6 changes: 5 additions & 1 deletion docs/shared-contract-migration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Shared contract migration

This migration moves the pre-extraction baseline `015479e4340f61598d2125532acf6474381ca976` to `@commercekit-tools/notification-contract@0.0.2`. Notify remains unreleased.
The original migration moved the pre-extraction baseline `015479e4340f61598d2125532acf6474381ca976` to `@commercekit-tools/notification-contract@0.0.2`. Notify now pins `0.0.3`; this additive package upgrade preserves the schema, rendering and delivery policies described below. Notify remains unreleased.

## Ownership inventory

Expand All @@ -27,3 +27,7 @@ This migration adopts package 0.0.2's stricter validation: HTTPS links ending in
Package errors do not expose Ajv diagnostic paths. The local adapter retains the invalid-JSON and byte-limit messages and uses bounded, input-free messages for schema/type/status/data and link errors. No invalid JSON is echoed. Validation failures remain fatal and occur before delivery.

The context adapter preserves producer values, fills safe missing metadata, requires an explicit runner server URL, and supports producer repository/run metadata when runner values are missing. The package also rejects C1 control characters in extracted metadata and requires an origin-only server URL; the baseline extractor accepted those metadata characters and HTTPS server path prefixes. This migration adopts those stricter context policies. Invalid runner metadata is omitted without overriding valid producer context.

## Action Kit 0.0.3 adoption

Version 0.0.3 adds opt-in text primitives used by Build and Deploy. Notify retains its provider-specific sanitizer, redaction labels and webhook retry policy; the new primitives do not replace those policies. Upgrade the exact package dependency, installed-version assertions and reviewed release-age exception together, then regenerate the registry lockfile and committed bundle after publication. Preserve the existing golden snapshots and original migration provenance. Run the complete quality gate before pushing.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@actions/core": "3.0.1",
"@commercekit-tools/notification-contract": "0.0.2"
"@commercekit-tools/notification-contract": "0.0.3"
},
"devDependencies": {
"@eslint/js": "10.0.1",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
minimumReleaseAgeExclude:
- '@commercekit-tools/notification-contract@0.0.2'
- '@commercekit-tools/notification-contract@0.0.3'
overrides:
minimatch: 11.0.1
6 changes: 3 additions & 3 deletions scripts/schema-check.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { parseNotificationEventJson } from '@commercekit-tools/notification-cont

const root = new URL('../', import.meta.url);
const manifest = JSON.parse(await readFile(new URL('package.json', root), 'utf8'));
assert.equal(metadata.version, '0.0.2');
assert.equal(manifest.dependencies['@commercekit-tools/notification-contract'], '0.0.2');
assert.equal(metadata.version, '0.0.3');
assert.equal(manifest.dependencies['@commercekit-tools/notification-contract'], '0.0.3');
assert.equal(schema.$schema, 'https://json-schema.org/draft/2020-12/schema');
assert.equal(schema.properties.schemaVersion.const, 1);
assert(!existsSync(new URL('schema/notification-event-v1.schema.json', root)), 'Local schema must not be vendored.');
Expand All @@ -30,4 +30,4 @@ assert.deepEqual(
].sort(),
);
assert.deepEqual([...schema.properties.eventType.enum].sort(), [...types].sort());
console.log('Notification contract 0.0.2: public schema export, all fixtures and supported event types verified.');
console.log('Notification contract 0.0.3: public schema export, all fixtures and supported event types verified.');
2 changes: 1 addition & 1 deletion tests/package-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { renderTeams } from '../src/providers/teams-workflow/render.js';
const text = await readFile(new URL('./fixtures/events/build-success.json', import.meta.url), 'utf8');

it('uses the pinned package and its public schema export', () => {
expect(metadata.version).toBe('0.0.2');
expect(metadata.version).toBe('0.0.3');
expect(schema.properties.schemaVersion.const).toBe(1);
});

Expand Down