@plainconceptsplatform/workflows 0.1.2 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -10
- package/dist/catalog-installation.d.ts +3 -2
- package/dist/catalog-installation.js +26 -6
- package/dist/catalog-installation.test.js +104 -10
- package/dist/catalog-listing.d.ts +13 -0
- package/dist/catalog-listing.js +68 -0
- package/dist/catalog-listing.test.d.ts +1 -0
- package/dist/catalog-listing.test.js +137 -0
- package/dist/index.js +62 -11
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +112 -0
- package/dist/repository-inspection.test.d.ts +1 -0
- package/dist/repository-inspection.test.js +77 -0
- package/dist/workflow-catalog.d.ts +9 -7
- package/dist/workflow-catalog.js +21 -16
- package/dist/workflow-catalog.test.js +18 -3
- package/loops/actions/add-issue-labels/action.yml +30 -29
- package/loops/actions/agent-output.cjs +1 -0
- package/loops/actions/apply-agent-bundle/action.yml +24 -23
- package/loops/actions/apply-agent-bundle/apply-bundle.sh +1 -0
- package/loops/actions/apply-agent-comments/action.yml +42 -41
- package/loops/actions/apply-agent-labels/action.yml +55 -54
- package/loops/actions/apply-agent-output/action.yml +108 -107
- package/loops/actions/audit-close/action.yml +104 -103
- package/loops/actions/classify-route/action.yml +91 -90
- package/loops/actions/classify-route/classify-route.sh +1 -0
- package/loops/actions/cleanup-artifacts/action.yml +65 -64
- package/loops/actions/close-agent-issues/action.yml +43 -42
- package/loops/actions/create-agent-issues/action.yml +52 -51
- package/loops/actions/create-issue-comment/action.yml +29 -28
- package/loops/actions/download-agent-output/action.yml +53 -52
- package/loops/actions/identify-gate-subject/action.yml +97 -96
- package/loops/actions/link-pr-to-issue/action.yml +40 -39
- package/loops/actions/list-open-issues/action.yml +33 -32
- package/loops/actions/load-issue-context/action.yml +43 -42
- package/loops/actions/merge-agent-pr/action.yml +36 -35
- package/loops/actions/push-agent-branch/action.yml +45 -44
- package/loops/actions/remove-issue-labels/action.yml +35 -34
- package/loops/actions/stale-recovery/action.yml +288 -287
- package/loops/actions/update-agent-issues/action.yml +58 -57
- package/loops/actions/validate-refine-output/action.yml +44 -43
- package/loops/actions/validate-refine-output/validate-refine-output.sh +1 -0
- package/loops/actions/verify-composite-actions/action.yml +9 -8
- package/loops/actions/verify-composite-actions/verify-composite-actions.sh +1 -0
- package/loops/actions/verify-refine-output/action.yml +9 -8
- package/loops/actions/verify-refine-output/verify-refine-output.sh +1 -0
- package/loops/actions/verify-route-matrix/action.yml +9 -8
- package/loops/actions/verify-route-matrix/verify-route-matrix.sh +1 -0
- package/loops/scripts/compile-agent-workflows.mjs +18 -2
- package/loops/templates/agentics/agentics-checks.yml +86 -0
- package/loops/templates/agentics/agentics-maintenance.yml +121 -0
- package/loops/templates/ci/app-ci-dotnet-next.yml +167 -0
- package/loops/templates/ci/app-ci-node-monorepo.yml +178 -0
- package/loops/templates/opencode/opencode.ci.json +46 -0
- package/loops/templates/opencode/opencode.ci.json.md +41 -0
- package/loops/workflows/agent-apply-review.md +9 -10
- package/loops/workflows/agent-audit.md +6 -7
- package/loops/workflows/agent-direct.md +7 -8
- package/loops/workflows/agent-implement.md +7 -8
- package/loops/workflows/agent-merge-gate.md +9 -10
- package/loops/workflows/agent-propose.md +7 -8
- package/loops/workflows/agent-refine.md +5 -7
- package/loops/workflows/shared/opencode-ci.md +1 -0
- package/loops/workflows/shared/platform-defaults.md +1 -0
- package/loops/workflows/work-router.yml +1 -0
- package/package.json +2 -2
- package/loops/aw/repo-config.md +0 -12
|
@@ -1,57 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (item.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/update-agent-issues/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
+
name: Update agent issues
|
|
3
|
+
description: Apply every update_issue item from agent_output.json.
|
|
4
|
+
inputs:
|
|
5
|
+
output-file:
|
|
6
|
+
description: Path to agent_output.json.
|
|
7
|
+
required: true
|
|
8
|
+
token:
|
|
9
|
+
description: GitHub token with issues:write.
|
|
10
|
+
required: true
|
|
11
|
+
fallback-issue-number:
|
|
12
|
+
description: Issue an item targets when it names none.
|
|
13
|
+
required: false
|
|
14
|
+
default: ''
|
|
15
|
+
runs:
|
|
16
|
+
using: composite
|
|
17
|
+
steps:
|
|
18
|
+
- name: Update issues
|
|
19
|
+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
20
|
+
env:
|
|
21
|
+
AGENT_OUTPUT_LIB: ${{ github.action_path }}/../agent-output.cjs
|
|
22
|
+
OUTPUT_FILE: ${{ inputs.output-file }}
|
|
23
|
+
FALLBACK_ISSUE_NUMBER: ${{ inputs.fallback-issue-number }}
|
|
24
|
+
with:
|
|
25
|
+
github-token: ${{ inputs.token }}
|
|
26
|
+
script: |
|
|
27
|
+
const { readAgentItems } = require(process.env.AGENT_OUTPUT_LIB);
|
|
28
|
+
const items = readAgentItems(process.env.OUTPUT_FILE, 'update_issue');
|
|
29
|
+
|
|
30
|
+
let updated = 0;
|
|
31
|
+
|
|
32
|
+
for (const item of items) {
|
|
33
|
+
const target = item.item_number ?? process.env.FALLBACK_ISSUE_NUMBER;
|
|
34
|
+
|
|
35
|
+
if (!target) {
|
|
36
|
+
core.warning(`update_issue item has no item_number and no fallback, skipping: ${JSON.stringify(item)}`);
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const changes = {};
|
|
41
|
+
if (item.title) changes.title = item.title;
|
|
42
|
+
if (item.body) changes.body = item.body;
|
|
43
|
+
|
|
44
|
+
if (Object.keys(changes).length === 0) {
|
|
45
|
+
core.warning(`update_issue item changes nothing, skipping: ${JSON.stringify(item)}`);
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
await github.rest.issues.update({
|
|
50
|
+
...context.repo,
|
|
51
|
+
issue_number: Number(target),
|
|
52
|
+
...changes,
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
updated += 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
core.info(`Updated ${updated} issue(s).`);
|
|
@@ -1,43 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
echo "
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/validate-refine-output/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
+
name: Validate refine output
|
|
3
|
+
description: Verify agent_output.json contains a usable refinement outcome before any GitHub writes.
|
|
4
|
+
inputs:
|
|
5
|
+
output-file:
|
|
6
|
+
description: Path to agent_output.json.
|
|
7
|
+
required: true
|
|
8
|
+
marker:
|
|
9
|
+
description: Comment marker removed before evaluating clarification content.
|
|
10
|
+
required: true
|
|
11
|
+
comment-prefix:
|
|
12
|
+
description: Comment prefix removed before evaluating clarification content.
|
|
13
|
+
required: true
|
|
14
|
+
issue-number:
|
|
15
|
+
description: Issue number that every refinement outcome must target.
|
|
16
|
+
required: true
|
|
17
|
+
outputs:
|
|
18
|
+
valid:
|
|
19
|
+
description: Whether the output contains a usable replacement body or clarification comment.
|
|
20
|
+
value: ${{ steps.validate.outputs.valid }}
|
|
21
|
+
outcome:
|
|
22
|
+
description: "Deterministic refinement outcome: complete, questions, or invalid."
|
|
23
|
+
value: ${{ steps.validate.outputs.outcome }}
|
|
24
|
+
runs:
|
|
25
|
+
using: composite
|
|
26
|
+
steps:
|
|
27
|
+
- name: Validate refinement outcome
|
|
28
|
+
id: validate
|
|
29
|
+
shell: bash
|
|
30
|
+
env:
|
|
31
|
+
COMMENT_PREFIX: ${{ inputs.comment-prefix }}
|
|
32
|
+
ISSUE_NUMBER: ${{ inputs.issue-number }}
|
|
33
|
+
MARKER: ${{ inputs.marker }}
|
|
34
|
+
OUTPUT_FILE: ${{ inputs.output-file }}
|
|
35
|
+
run: |
|
|
36
|
+
set -euo pipefail
|
|
37
|
+
|
|
38
|
+
outcome="$(bash "${{ github.action_path }}/validate-refine-output.sh" "$OUTPUT_FILE" "$MARKER" "$COMMENT_PREFIX" "$ISSUE_NUMBER")"
|
|
39
|
+
echo "outcome=$outcome" >> "$GITHUB_OUTPUT"
|
|
40
|
+
echo "valid=$([ "$outcome" != 'invalid' ] && echo true || echo false)" >> "$GITHUB_OUTPUT"
|
|
41
|
+
|
|
42
|
+
if [ "$outcome" = 'invalid' ]; then
|
|
43
|
+
echo "::warning::Agent output has no usable refinement outcome. It will not be applied."
|
|
44
|
+
fi
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/validate-refine-output/validate-refine-output.sh. Update with `workflows update --force`; consumer edits may be overwritten.
|
|
2
3
|
# Print the deterministic Refine outcome: complete, questions, or invalid.
|
|
3
4
|
|
|
4
5
|
set -euo pipefail
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/verify-composite-actions/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
+
name: Verify composite actions
|
|
3
|
+
description: Check every local composite action manifest parses and uses only contexts a composite action actually has.
|
|
4
|
+
runs:
|
|
5
|
+
using: composite
|
|
6
|
+
steps:
|
|
7
|
+
- name: Validate composite action manifests
|
|
8
|
+
shell: bash
|
|
9
|
+
run: bash "${GITHUB_ACTION_PATH}/verify-composite-actions.sh"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/verify-composite-actions/verify-composite-actions.sh. Update with `workflows update --force`; consumer edits may be overwritten.
|
|
2
3
|
# Validate every local composite action manifest.
|
|
3
4
|
#
|
|
4
5
|
# The runner evaluates ${{ }} everywhere in an action.yml, including inside `description:`,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/verify-refine-output/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
+
name: Verify refine output validation
|
|
3
|
+
description: Exercise deterministic Refine output validation regressions.
|
|
4
|
+
runs:
|
|
5
|
+
using: composite
|
|
6
|
+
steps:
|
|
7
|
+
- name: Verify refinement outcomes
|
|
8
|
+
shell: bash
|
|
9
|
+
run: bash "${{ github.action_path }}/verify-refine-output.sh"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/verify-refine-output/verify-refine-output.sh. Update with `workflows update --force`; consumer edits may be overwritten.
|
|
2
3
|
# Exercise real validation script so incomplete agent output cannot be applied.
|
|
3
4
|
|
|
4
5
|
set -euo pipefail
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/verify-route-matrix/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
+
name: Verify route matrix
|
|
3
|
+
description: Exercise the router's classifier against every supported event, and check that each route and dispatch operation has a job in work-router.yml.
|
|
4
|
+
runs:
|
|
5
|
+
using: composite
|
|
6
|
+
steps:
|
|
7
|
+
- name: Run route matrix verification
|
|
8
|
+
shell: bash
|
|
9
|
+
run: bash "${GITHUB_ACTION_PATH}/verify-route-matrix.sh"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/verify-route-matrix/verify-route-matrix.sh. Update with `workflows update --force`; consumer edits may be overwritten.
|
|
2
3
|
# Exercise the router's real classifier. This sources classify-route.sh rather than
|
|
3
4
|
# restating it, so a change to the route table cannot pass here by being copied twice.
|
|
4
5
|
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
+
// Managed by @plainconceptsplatform/workflows. Source: loops/scripts/compile-agent-workflows.mjs. Update with `workflows update --force`; consumer edits may be overwritten.
|
|
1
2
|
import { spawnSync } from "node:child_process";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
2
4
|
|
|
3
|
-
const
|
|
5
|
+
const workflowDirectory = existsSync("loops/workflows") ? "loops/workflows" : ".github/workflows";
|
|
6
|
+
|
|
7
|
+
// On Windows, `gh` resolves to a shim that spawnSync cannot find without a shell.
|
|
8
|
+
// Resolve the full path via `where` so spawnSync works with shell: false (security-safe).
|
|
9
|
+
function resolveGhPath() {
|
|
10
|
+
if (process.platform !== "win32") return "gh";
|
|
11
|
+
const result = spawnSync("where", ["gh"], { encoding: "utf8", shell: false });
|
|
12
|
+
if (result.status === 0) {
|
|
13
|
+
const first = result.stdout.split("\n").map((s) => s.trim()).find(Boolean);
|
|
14
|
+
if (first) return first;
|
|
15
|
+
}
|
|
16
|
+
return "gh";
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const compile = spawnSync(resolveGhPath(), ["aw", "compile", "--strict", "--dir", workflowDirectory], {
|
|
4
20
|
stdio: "inherit",
|
|
5
|
-
shell:
|
|
21
|
+
shell: false,
|
|
6
22
|
});
|
|
7
23
|
|
|
8
24
|
if (compile.error?.code === "ENOENT" || compile.status === null) {
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/templates/agentics/agentics-checks.yml. Update with `workflows update --force`; consumer edits may be overwritten.
|
|
2
|
+
name: Agentics checks
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
paths:
|
|
7
|
+
- .github/workflows/*.md
|
|
8
|
+
- .github/workflows/shared/*.md
|
|
9
|
+
- .github/workflows/*.yml
|
|
10
|
+
- .github/workflows/aw.json
|
|
11
|
+
- .github/actions/**
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
GH_AW_VERSION: v0.83.4
|
|
15
|
+
ACTIONLINT_VERSION: 1.7.7
|
|
16
|
+
ACTIONLINT_SHA256: 023070a287cd8cccd71515fedc843f1985bf96c436b7effaecce67290e7e0757
|
|
17
|
+
AGENTICS_COMPILE_COMMAND: gh aw compile --strict
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
|
|
22
|
+
concurrency:
|
|
23
|
+
group: agentics-checks-${{ github.event.pull_request.number }}
|
|
24
|
+
cancel-in-progress: true
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
verify-lockfiles:
|
|
28
|
+
name: Verify generated agent lockfiles
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
timeout-minutes: 10
|
|
31
|
+
steps:
|
|
32
|
+
- name: Checkout repository
|
|
33
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
34
|
+
with:
|
|
35
|
+
persist-credentials: false
|
|
36
|
+
- name: Install gh-aw
|
|
37
|
+
uses: github/gh-aw-actions/setup@e89c65e17eb281bbd5ff2ff9e9199a03e96654c7 # v0.83.4
|
|
38
|
+
with:
|
|
39
|
+
version: ${{ env.GH_AW_VERSION }}
|
|
40
|
+
- name: Compile agent workflows strictly
|
|
41
|
+
run: ${{ env.AGENTICS_COMPILE_COMMAND }}
|
|
42
|
+
- name: Verify generated lockfiles are current
|
|
43
|
+
shell: bash
|
|
44
|
+
run: |
|
|
45
|
+
set -euo pipefail
|
|
46
|
+
if git diff --exit-code -- .github/workflows/*.lock.yml; then
|
|
47
|
+
exit 0
|
|
48
|
+
fi
|
|
49
|
+
if git diff --exit-code -I '^[[:space:]]*GH_AW_INFO_MODEL_COSTS:' -- .github/workflows/*.lock.yml; then
|
|
50
|
+
echo "::warning::Only volatile GH_AW_INFO_MODEL_COSTS metadata changed."
|
|
51
|
+
exit 0
|
|
52
|
+
fi
|
|
53
|
+
echo "::error::Generated agent lockfiles are stale. Run '${AGENTICS_COMPILE_COMMAND}' and commit the resulting .lock.yml files."
|
|
54
|
+
git diff -- .github/workflows/*.lock.yml
|
|
55
|
+
exit 1
|
|
56
|
+
|
|
57
|
+
lint-workflows:
|
|
58
|
+
name: Lint authored workflows and shell
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
timeout-minutes: 10
|
|
61
|
+
steps:
|
|
62
|
+
- name: Checkout repository
|
|
63
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
64
|
+
with:
|
|
65
|
+
persist-credentials: false
|
|
66
|
+
- name: Install actionlint
|
|
67
|
+
shell: bash
|
|
68
|
+
run: |
|
|
69
|
+
set -euo pipefail
|
|
70
|
+
tarball="$RUNNER_TEMP/actionlint.tar.gz"
|
|
71
|
+
curl -fsSL -o "$tarball" "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz"
|
|
72
|
+
echo "${ACTIONLINT_SHA256} $tarball" | sha256sum --check --strict
|
|
73
|
+
mkdir -p "$RUNNER_TEMP/bin"
|
|
74
|
+
tar -xzf "$tarball" -C "$RUNNER_TEMP/bin" actionlint
|
|
75
|
+
echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
|
|
76
|
+
- name: Lint authored workflows
|
|
77
|
+
shell: bash
|
|
78
|
+
run: |
|
|
79
|
+
set -euo pipefail
|
|
80
|
+
mapfile -t authored < <(git ls-files '.github/workflows/*.yml' | grep -vE '\.lock\.yml$|agentics-maintenance\.yml$')
|
|
81
|
+
if [ "${#authored[@]}" -gt 0 ]; then
|
|
82
|
+
actionlint "${authored[@]}"
|
|
83
|
+
fi
|
|
84
|
+
- name: Lint composite action shell
|
|
85
|
+
shell: bash
|
|
86
|
+
run: find .github/actions -name '*.sh' -print0 | xargs -0 -r shellcheck -x
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/templates/agentics/agentics-maintenance.yml. Update with `workflows update --force`; consumer edits may be overwritten.
|
|
2
|
+
# Derived from the gh-aw v0.83.4 maintenance workflow.
|
|
3
|
+
# Copy provenance is documented in docs/ownership.md.
|
|
4
|
+
name: Agentic Maintenance
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: "37 0 * * *"
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
inputs:
|
|
11
|
+
operation:
|
|
12
|
+
description: Optional maintenance operation to run
|
|
13
|
+
required: false
|
|
14
|
+
type: choice
|
|
15
|
+
default: ""
|
|
16
|
+
options:
|
|
17
|
+
- ""
|
|
18
|
+
- disable
|
|
19
|
+
- enable
|
|
20
|
+
- update
|
|
21
|
+
- upgrade
|
|
22
|
+
- safe_outputs
|
|
23
|
+
- create_labels
|
|
24
|
+
- activity_report
|
|
25
|
+
- close_agentic_workflows_issues
|
|
26
|
+
- clean_cache_memories
|
|
27
|
+
- update_pull_request_branches
|
|
28
|
+
- validate
|
|
29
|
+
- forecast
|
|
30
|
+
run_url:
|
|
31
|
+
description: Run URL or run ID required for safe_outputs
|
|
32
|
+
required: false
|
|
33
|
+
type: string
|
|
34
|
+
default: ""
|
|
35
|
+
workflow_call:
|
|
36
|
+
inputs:
|
|
37
|
+
operation:
|
|
38
|
+
required: false
|
|
39
|
+
type: string
|
|
40
|
+
default: ""
|
|
41
|
+
run_url:
|
|
42
|
+
required: false
|
|
43
|
+
type: string
|
|
44
|
+
default: ""
|
|
45
|
+
|
|
46
|
+
permissions: {}
|
|
47
|
+
|
|
48
|
+
jobs:
|
|
49
|
+
close-expired-discussions:
|
|
50
|
+
if: ${{ !(github.event.repository.fork) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '') }}
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
permissions:
|
|
53
|
+
discussions: write
|
|
54
|
+
steps:
|
|
55
|
+
- name: Setup Scripts
|
|
56
|
+
uses: github/gh-aw-actions/setup@e89c65e17eb281bbd5ff2ff9e9199a03e96654c7 # v0.83.4
|
|
57
|
+
with:
|
|
58
|
+
destination: ${{ runner.temp }}/gh-aw/actions
|
|
59
|
+
- name: Close expired discussions
|
|
60
|
+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
61
|
+
with:
|
|
62
|
+
script: |
|
|
63
|
+
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
64
|
+
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
65
|
+
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_expired_discussions.cjs');
|
|
66
|
+
await main();
|
|
67
|
+
close-expired-issues:
|
|
68
|
+
if: ${{ !(github.event.repository.fork) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '') }}
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
permissions:
|
|
71
|
+
issues: write
|
|
72
|
+
steps:
|
|
73
|
+
- name: Setup Scripts
|
|
74
|
+
uses: github/gh-aw-actions/setup@e89c65e17eb281bbd5ff2ff9e9199a03e96654c7 # v0.83.4
|
|
75
|
+
with:
|
|
76
|
+
destination: ${{ runner.temp }}/gh-aw/actions
|
|
77
|
+
- name: Close expired issues
|
|
78
|
+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
79
|
+
with:
|
|
80
|
+
script: |
|
|
81
|
+
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
82
|
+
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
83
|
+
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_expired_issues.cjs');
|
|
84
|
+
await main();
|
|
85
|
+
close-expired-pull-requests:
|
|
86
|
+
if: ${{ !(github.event.repository.fork) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '') }}
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
permissions:
|
|
89
|
+
pull-requests: write
|
|
90
|
+
steps:
|
|
91
|
+
- name: Setup Scripts
|
|
92
|
+
uses: github/gh-aw-actions/setup@e89c65e17eb281bbd5ff2ff9e9199a03e96654c7 # v0.83.4
|
|
93
|
+
with:
|
|
94
|
+
destination: ${{ runner.temp }}/gh-aw/actions
|
|
95
|
+
- name: Close expired pull requests
|
|
96
|
+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
97
|
+
with:
|
|
98
|
+
script: |
|
|
99
|
+
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
100
|
+
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
101
|
+
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_expired_pull_requests.cjs');
|
|
102
|
+
await main();
|
|
103
|
+
cleanup-cache-memory:
|
|
104
|
+
if: ${{ !(github.event.repository.fork) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '' || inputs.operation == 'clean_cache_memories') }}
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
permissions:
|
|
107
|
+
actions: write
|
|
108
|
+
steps:
|
|
109
|
+
- name: Setup Scripts
|
|
110
|
+
uses: github/gh-aw-actions/setup@e89c65e17eb281bbd5ff2ff9e9199a03e96654c7 # v0.83.4
|
|
111
|
+
with:
|
|
112
|
+
destination: ${{ runner.temp }}/gh-aw/actions
|
|
113
|
+
- name: Cleanup outdated cache-memory entries
|
|
114
|
+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
115
|
+
with:
|
|
116
|
+
script: |
|
|
117
|
+
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
118
|
+
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
119
|
+
const { main } = require('${{ runner.temp }}/gh-aw/actions/cleanup_cache_memory.cjs');
|
|
120
|
+
await main();
|
|
121
|
+
#
|