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
10,751 changes: 6,967 additions & 3,784 deletions action/index.mjs

Large diffs are not rendered by default.

493 changes: 484 additions & 9 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"prepublishOnly": "npm run build"
},
"dependencies": {
"@intentius/chant": "^0.11.0",
"@intentius/chant-lexicon-github": "^0.11.0"
"@intentius/chant": "^0.44.1",
"@intentius/chant-lexicon-github": "^0.44.1"
},
"devDependencies": {
"@types/libsodium-wrappers": "^0.7.14",
Expand Down
15 changes: 15 additions & 0 deletions src/cli/verbs.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Every cycle stamps a governance verb (chant#790), so this provider's plans
* read on the same cross-provider grammar as every other warden's.
*/
import { describe, expect, it } from "vitest";
import { isGovernanceVerb } from "@intentius/chant/governance";
import { CYCLE_REGISTRY } from "./registry.js";

describe("governance verbs (chant#790)", () => {
it("every registered cycle stamps a valid verb", () => {
for (const [name, cycle] of Object.entries(CYCLE_REGISTRY)) {
expect(isGovernanceVerb(cycle.verb), `cycle "${name}" stamps no governance verb`).toBe(true);
}
});
});
1 change: 1 addition & 0 deletions src/cycles/branch-protection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ function buildProtectionBody(
*/
export const branchProtectionCycle: Cycle<BranchProtectionScope> = {
name: "branch-protection",
verb: "policy-guardrail",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
1 change: 1 addition & 0 deletions src/cycles/dependency-hygiene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export async function fetchDependabot(

export const dependencyHygieneCycle: Cycle<DependencyHygieneScope> = {
name: "dependency-hygiene",
verb: "policy-guardrail",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
1 change: 1 addition & 0 deletions src/cycles/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ async function fetchRepoEnvironments(

export const environmentsCycle: Cycle<EnvironmentsScope> = {
name: "environments",
verb: "policy-guardrail",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
1 change: 1 addition & 0 deletions src/cycles/membership.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export async function listOrgMembers(
*/
export const membershipCycle: Cycle<MembershipScope> = {
name: "membership",
verb: "membership",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
1 change: 1 addition & 0 deletions src/cycles/org-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export function buildOrgPatchBody(desired: OrgSettings): Record<string, unknown>
*/
export const orgSettingsCycle: Cycle<OrgSettingsScope> = {
name: "org-settings",
verb: "org-unit",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
1 change: 1 addition & 0 deletions src/cycles/repo-baseline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export async function listOrgRepoNames(

export const repoBaselineCycle: Cycle<RepoBaselineScope> = {
name: "repo-baseline",
verb: "org-unit",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
1 change: 1 addition & 0 deletions src/cycles/repo-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export function buildRepoPatchBody(desired: RepoConfig): Record<string, unknown>
*/
export const repoSettingsCycle: Cycle<RepoSettingsScope> = {
name: "repo-settings",
verb: "org-unit",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
1 change: 1 addition & 0 deletions src/cycles/rulesets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ async function applyRuleset(

export const rulesetsCycle: Cycle<RulesetsScope> = {
name: "rulesets",
verb: "policy-guardrail",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
1 change: 1 addition & 0 deletions src/cycles/secrets-variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ async function applyVariable(

export const secretsVariablesCycle: Cycle<SecretsVariablesScope> = {
name: "secrets-variables",
verb: "secret-material",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
1 change: 1 addition & 0 deletions src/cycles/security-features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export function buildSecurityAnalysisBody(desired: RepoSecurityConfig): Record<s

export const securityFeaturesCycle: Cycle<SecurityFeaturesScope> = {
name: "security-features",
verb: "policy-guardrail",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
1 change: 1 addition & 0 deletions src/cycles/teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ function splitKey(key: string, resourceType: string): [string, string] {

export const teamsCycle: Cycle<TeamsScope> = {
name: "teams",
verb: "membership",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
1 change: 1 addition & 0 deletions src/cycles/token-approval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export function mapTokenRequest(raw: GhTokenRequest): LiveTokenRequest {

export const tokenApprovalCycle: Cycle<TokenApprovalScope> = {
name: "token-approval",
verb: "identity-assignment",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
1 change: 1 addition & 0 deletions src/cycles/token-governance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export function mapTokenGrant(raw: GhTokenGrant): LiveTokenGrant {

export const tokenGovernanceCycle: Cycle<TokenGovernanceScope> = {
name: "token-governance",
verb: "identity-assignment",

// ── Part 2: fetchLive ──────────────────────────────────────────────────────

Expand Down
Loading