@plainconceptsplatform/workflows 0.1.2 → 0.2.0

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.
Files changed (71) hide show
  1. package/README.md +40 -11
  2. package/dist/catalog-installation.d.ts +11 -2
  3. package/dist/catalog-installation.js +53 -9
  4. package/dist/catalog-installation.test.js +198 -16
  5. package/dist/catalog-listing.d.ts +13 -0
  6. package/dist/catalog-listing.js +68 -0
  7. package/dist/catalog-listing.test.d.ts +1 -0
  8. package/dist/catalog-listing.test.js +137 -0
  9. package/dist/index.js +76 -12
  10. package/dist/index.test.d.ts +1 -0
  11. package/dist/index.test.js +112 -0
  12. package/dist/repository-inspection.test.d.ts +1 -0
  13. package/dist/repository-inspection.test.js +77 -0
  14. package/dist/tui.d.ts +25 -0
  15. package/dist/tui.js +254 -0
  16. package/dist/tui.test.d.ts +1 -0
  17. package/dist/tui.test.js +246 -0
  18. package/dist/workflow-catalog.d.ts +15 -8
  19. package/dist/workflow-catalog.js +25 -15
  20. package/dist/workflow-catalog.test.js +18 -3
  21. package/loops/actions/add-issue-labels/action.yml +30 -29
  22. package/loops/actions/agent-output.cjs +1 -0
  23. package/loops/actions/apply-agent-bundle/action.yml +24 -23
  24. package/loops/actions/apply-agent-bundle/apply-bundle.sh +1 -0
  25. package/loops/actions/apply-agent-comments/action.yml +42 -41
  26. package/loops/actions/apply-agent-labels/action.yml +55 -54
  27. package/loops/actions/apply-agent-output/action.yml +108 -107
  28. package/loops/actions/audit-close/action.yml +104 -103
  29. package/loops/actions/classify-route/action.yml +91 -90
  30. package/loops/actions/classify-route/classify-route.sh +1 -0
  31. package/loops/actions/cleanup-artifacts/action.yml +65 -64
  32. package/loops/actions/close-agent-issues/action.yml +43 -42
  33. package/loops/actions/create-agent-issues/action.yml +52 -51
  34. package/loops/actions/create-issue-comment/action.yml +29 -28
  35. package/loops/actions/download-agent-output/action.yml +53 -52
  36. package/loops/actions/identify-gate-subject/action.yml +97 -96
  37. package/loops/actions/link-pr-to-issue/action.yml +40 -39
  38. package/loops/actions/list-open-issues/action.yml +33 -32
  39. package/loops/actions/load-issue-context/action.yml +43 -42
  40. package/loops/actions/merge-agent-pr/action.yml +36 -35
  41. package/loops/actions/push-agent-branch/action.yml +45 -44
  42. package/loops/actions/remove-issue-labels/action.yml +35 -34
  43. package/loops/actions/stale-recovery/action.yml +288 -287
  44. package/loops/actions/update-agent-issues/action.yml +58 -57
  45. package/loops/actions/validate-refine-output/action.yml +44 -43
  46. package/loops/actions/validate-refine-output/validate-refine-output.sh +1 -0
  47. package/loops/actions/verify-composite-actions/action.yml +9 -8
  48. package/loops/actions/verify-composite-actions/verify-composite-actions.sh +1 -0
  49. package/loops/actions/verify-refine-output/action.yml +9 -8
  50. package/loops/actions/verify-refine-output/verify-refine-output.sh +1 -0
  51. package/loops/actions/verify-route-matrix/action.yml +9 -8
  52. package/loops/actions/verify-route-matrix/verify-route-matrix.sh +1 -0
  53. package/loops/scripts/compile-agent-workflows.mjs +29 -13
  54. package/loops/templates/agentics/agentics-checks.yml +86 -0
  55. package/loops/templates/agentics/agentics-maintenance.yml +121 -0
  56. package/loops/templates/ci/app-ci-dotnet-next.yml +167 -0
  57. package/loops/templates/ci/app-ci-node-monorepo.yml +178 -0
  58. package/loops/templates/opencode/opencode.ci.json +46 -0
  59. package/loops/templates/opencode/opencode.ci.json.md +41 -0
  60. package/loops/workflows/agent-apply-review.md +9 -10
  61. package/loops/workflows/agent-audit.md +6 -7
  62. package/loops/workflows/agent-direct.md +7 -8
  63. package/loops/workflows/agent-implement.md +7 -8
  64. package/loops/workflows/agent-merge-gate.md +9 -10
  65. package/loops/workflows/agent-propose.md +7 -8
  66. package/loops/workflows/agent-refine.md +5 -7
  67. package/loops/workflows/shared/opencode-ci.md +105 -1
  68. package/loops/workflows/shared/platform-defaults.md +1 -0
  69. package/loops/workflows/work-router.yml +1 -0
  70. package/package.json +2 -2
  71. package/loops/aw/repo-config.md +0 -12
@@ -1,57 +1,58 @@
1
- name: Update agent issues
2
- description: Apply every update_issue item from agent_output.json.
3
- inputs:
4
- output-file:
5
- description: Path to agent_output.json.
6
- required: true
7
- token:
8
- description: GitHub token with issues:write.
9
- required: true
10
- fallback-issue-number:
11
- description: Issue an item targets when it names none.
12
- required: false
13
- default: ''
14
- runs:
15
- using: composite
16
- steps:
17
- - name: Update issues
18
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
19
- env:
20
- AGENT_OUTPUT_LIB: ${{ github.action_path }}/../agent-output.cjs
21
- OUTPUT_FILE: ${{ inputs.output-file }}
22
- FALLBACK_ISSUE_NUMBER: ${{ inputs.fallback-issue-number }}
23
- with:
24
- github-token: ${{ inputs.token }}
25
- script: |
26
- const { readAgentItems } = require(process.env.AGENT_OUTPUT_LIB);
27
- const items = readAgentItems(process.env.OUTPUT_FILE, 'update_issue');
28
-
29
- let updated = 0;
30
-
31
- for (const item of items) {
32
- const target = item.item_number ?? process.env.FALLBACK_ISSUE_NUMBER;
33
-
34
- if (!target) {
35
- core.warning(`update_issue item has no item_number and no fallback, skipping: ${JSON.stringify(item)}`);
36
- continue;
37
- }
38
-
39
- const changes = {};
40
- if (item.title) changes.title = item.title;
41
- if (item.body) changes.body = item.body;
42
-
43
- if (Object.keys(changes).length === 0) {
44
- core.warning(`update_issue item changes nothing, skipping: ${JSON.stringify(item)}`);
45
- continue;
46
- }
47
-
48
- await github.rest.issues.update({
49
- ...context.repo,
50
- issue_number: Number(target),
51
- ...changes,
52
- });
53
-
54
- updated += 1;
55
- }
56
-
57
- core.info(`Updated ${updated} issue(s).`);
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
- name: Validate refine output
2
- description: Verify agent_output.json contains a usable refinement outcome before any GitHub writes.
3
- inputs:
4
- output-file:
5
- description: Path to agent_output.json.
6
- required: true
7
- marker:
8
- description: Comment marker removed before evaluating clarification content.
9
- required: true
10
- comment-prefix:
11
- description: Comment prefix removed before evaluating clarification content.
12
- required: true
13
- issue-number:
14
- description: Issue number that every refinement outcome must target.
15
- required: true
16
- outputs:
17
- valid:
18
- description: Whether the output contains a usable replacement body or clarification comment.
19
- value: ${{ steps.validate.outputs.valid }}
20
- outcome:
21
- description: "Deterministic refinement outcome: complete, questions, or invalid."
22
- value: ${{ steps.validate.outputs.outcome }}
23
- runs:
24
- using: composite
25
- steps:
26
- - name: Validate refinement outcome
27
- id: validate
28
- shell: bash
29
- env:
30
- COMMENT_PREFIX: ${{ inputs.comment-prefix }}
31
- ISSUE_NUMBER: ${{ inputs.issue-number }}
32
- MARKER: ${{ inputs.marker }}
33
- OUTPUT_FILE: ${{ inputs.output-file }}
34
- run: |
35
- set -euo pipefail
36
-
37
- outcome="$(bash "${{ github.action_path }}/validate-refine-output.sh" "$OUTPUT_FILE" "$MARKER" "$COMMENT_PREFIX" "$ISSUE_NUMBER")"
38
- echo "outcome=$outcome" >> "$GITHUB_OUTPUT"
39
- echo "valid=$([ "$outcome" != 'invalid' ] && echo true || echo false)" >> "$GITHUB_OUTPUT"
40
-
41
- if [ "$outcome" = 'invalid' ]; then
42
- echo "::warning::Agent output has no usable refinement outcome. It will not be applied."
43
- fi
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
- name: Verify composite actions
2
- description: Check every local composite action manifest parses and uses only contexts a composite action actually has.
3
- runs:
4
- using: composite
5
- steps:
6
- - name: Validate composite action manifests
7
- shell: bash
8
- run: bash "${GITHUB_ACTION_PATH}/verify-composite-actions.sh"
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
- name: Verify refine output validation
2
- description: Exercise deterministic Refine output validation regressions.
3
- runs:
4
- using: composite
5
- steps:
6
- - name: Verify refinement outcomes
7
- shell: bash
8
- run: bash "${{ github.action_path }}/verify-refine-output.sh"
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
- name: Verify route matrix
2
- 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.
3
- runs:
4
- using: composite
5
- steps:
6
- - name: Run route matrix verification
7
- shell: bash
8
- run: bash "${GITHUB_ACTION_PATH}/verify-route-matrix.sh"
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,13 +1,29 @@
1
- import { spawnSync } from "node:child_process";
2
-
3
- const compile = spawnSync("gh", ["aw", "compile", "--strict", "--dir", "loops"], {
4
- stdio: "inherit",
5
- shell: process.platform === "win32",
6
- });
7
-
8
- if (compile.error?.code === "ENOENT" || compile.status === null) {
9
- process.stderr.write("Could not run `gh aw compile`. Install githubnext/gh-aw first.\n");
10
- process.exit(1);
11
- }
12
-
13
- process.exit(compile.status ?? 1);
1
+ // Managed by @plainconceptsplatform/workflows. Source: loops/scripts/compile-agent-workflows.mjs. Update with `workflows update --force`; consumer edits may be overwritten.
2
+ import { spawnSync } from "node:child_process";
3
+ import { existsSync } from "node:fs";
4
+
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], {
20
+ stdio: "inherit",
21
+ shell: false,
22
+ });
23
+
24
+ if (compile.error?.code === "ENOENT" || compile.status === null) {
25
+ process.stderr.write("Could not run `gh aw compile`. Install githubnext/gh-aw first.\n");
26
+ process.exit(1);
27
+ }
28
+
29
+ process.exit(compile.status ?? 1);
@@ -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
+ #