@openhands/extensions 0.20.0 → 0.22.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.
- package/.claude-plugin/marketplace.json +881 -0
- package/.codex-plugin/marketplace.json +881 -0
- package/.github/workflows/check-extensions.yml +4 -0
- package/.github/workflows/npm-publish.yml +9 -3
- package/.github/workflows/pr-artifacts.yml +294 -0
- package/.github/workflows/pr-description-check.yml +4 -2
- package/.plugin/marketplace.json +881 -0
- package/.release-please-manifest.json +1 -1
- package/AGENTS.md +27 -3
- package/README.md +6 -2
- package/automations/bundle-index.js +22 -3
- package/automations/catalog/github-agents-md-maintainer/manifest.json +2 -1
- package/automations/catalog/github-delivery-watchdog/manifest.json +79 -0
- package/automations/catalog/github-issue-to-pr/manifest.json +24 -15
- package/automations/catalog/github-issue-triage/manifest.json +73 -0
- package/automations/catalog/github-pr-reviewer/manifest.json +23 -15
- package/automations/catalog/gitlab-issue-to-mr/manifest.json +124 -0
- package/automations/catalog-index.js +17 -11
- package/integrations/catalog/reportportal.json +76 -0
- package/integrations/catalog-index.js +6 -4
- package/marketplaces/openhands-extensions.json +42 -0
- package/package.json +1 -1
- package/plugins/city-weather/.claude-plugin/plugin.json +13 -0
- package/plugins/city-weather/.codex-plugin/plugin.json +13 -0
- package/plugins/cobol-modernization/.claude-plugin/plugin.json +19 -0
- package/plugins/cobol-modernization/.codex-plugin/plugin.json +19 -0
- package/plugins/issue-duplicate-checker/.claude-plugin/plugin.json +13 -0
- package/plugins/issue-duplicate-checker/.codex-plugin/plugin.json +13 -0
- package/plugins/magic-test/.claude-plugin/plugin.json +13 -0
- package/plugins/magic-test/.codex-plugin/plugin.json +13 -0
- package/plugins/migration-scoring/.claude-plugin/plugin.json +19 -0
- package/plugins/migration-scoring/.codex-plugin/plugin.json +19 -0
- package/plugins/onboarding/.claude-plugin/plugin.json +20 -0
- package/plugins/onboarding/.codex-plugin/plugin.json +20 -0
- package/plugins/onboarding/skills/agent-readiness-report/references/criteria.md +144 -0
- package/plugins/onboarding/skills/improve-agent-readiness/references/criteria.md +144 -0
- package/plugins/openhands/.claude-plugin/plugin.json +13 -0
- package/plugins/openhands/.codex-plugin/plugin.json +13 -0
- package/plugins/openhands/skills/openhands-api/.claude-plugin/plugin.json +22 -0
- package/plugins/openhands/skills/openhands-api/.codex-plugin/plugin.json +22 -0
- package/plugins/openhands/skills/openhands-api/.plugin/plugin.json +22 -0
- package/plugins/openhands/skills/openhands-api/README.md +52 -0
- package/plugins/openhands/skills/openhands-api/SKILL.md +469 -0
- package/plugins/openhands/skills/openhands-api/references/README.md +33 -0
- package/plugins/openhands/skills/openhands-api/references/TROUBLESHOOTING.md +81 -0
- package/plugins/openhands/skills/openhands-api/references/example_prompt.md +12 -0
- package/plugins/openhands/skills/openhands-api/references/windows.md +44 -0
- package/plugins/openhands/skills/openhands-api/scripts/openhands_api.py +606 -0
- package/plugins/openhands/skills/openhands-api/scripts/openhands_api.ts +252 -0
- package/plugins/openhands/skills/openhands-automation/.claude-plugin/plugin.json +19 -0
- package/plugins/openhands/skills/openhands-automation/.codex-plugin/plugin.json +19 -0
- package/plugins/openhands/skills/openhands-automation/.plugin/plugin.json +19 -0
- package/plugins/openhands/skills/openhands-automation/README.md +89 -0
- package/plugins/openhands/skills/openhands-automation/SKILL.md +899 -0
- package/plugins/openhands/skills/openhands-automation/commands/automation-create.md +8 -0
- package/plugins/openhands/skills/openhands-automation/references/ab-testing.md +185 -0
- package/plugins/openhands/skills/openhands-automation/references/custom-automation.md +832 -0
- package/plugins/openhands/skills/openhands-automation/references/security.md +84 -0
- package/plugins/openhands/skills/openhands-automation/references/windows.md +57 -0
- package/plugins/openhands/skills/openhands-sdk/.claude-plugin/plugin.json +20 -0
- package/plugins/openhands/skills/openhands-sdk/.codex-plugin/plugin.json +20 -0
- package/plugins/openhands/skills/openhands-sdk/.plugin/plugin.json +20 -0
- package/plugins/openhands/skills/openhands-sdk/README.md +22 -0
- package/plugins/openhands/skills/openhands-sdk/SKILL.md +245 -0
- package/plugins/openhands/skills/openhands-sdk/commands/sdk.md +8 -0
- package/plugins/pr-review/.claude-plugin/plugin.json +13 -0
- package/plugins/pr-review/.codex-plugin/plugin.json +13 -0
- package/plugins/pr-review/skills/code-review/.claude-plugin/plugin.json +19 -0
- package/plugins/pr-review/skills/code-review/.codex-plugin/plugin.json +19 -0
- package/plugins/pr-review/skills/code-review/.plugin/plugin.json +19 -0
- package/plugins/pr-review/skills/code-review/README.md +18 -0
- package/plugins/pr-review/skills/code-review/SKILL.md +209 -0
- package/plugins/pr-review/skills/code-review/commands/codereview-roasted.md +8 -0
- package/plugins/pr-review/skills/code-review/commands/codereview.md +8 -0
- package/plugins/pr-review/skills/code-review/references/risk-evaluation.md +41 -0
- package/plugins/pr-review/skills/code-review/references/supply-chain-security.md +31 -0
- package/plugins/pr-review/skills/github-pr-review/.claude-plugin/plugin.json +18 -0
- package/plugins/pr-review/skills/github-pr-review/.codex-plugin/plugin.json +18 -0
- package/plugins/pr-review/skills/github-pr-review/.plugin/plugin.json +18 -0
- package/plugins/pr-review/skills/github-pr-review/README.md +145 -0
- package/plugins/pr-review/skills/github-pr-review/SKILL.md +187 -0
- package/plugins/pr-review/skills/github-pr-review/commands/github-pr-review.md +8 -0
- package/plugins/pr-review/skills/github-pr-review/references/windows.md +47 -0
- package/plugins/qa-changes/.claude-plugin/plugin.json +11 -0
- package/plugins/qa-changes/.codex-plugin/plugin.json +11 -0
- package/plugins/qa-changes/skills/github-pr-review/.claude-plugin/plugin.json +18 -0
- package/plugins/qa-changes/skills/github-pr-review/.codex-plugin/plugin.json +18 -0
- package/plugins/qa-changes/skills/github-pr-review/.plugin/plugin.json +18 -0
- package/plugins/qa-changes/skills/github-pr-review/README.md +145 -0
- package/plugins/qa-changes/skills/github-pr-review/SKILL.md +187 -0
- package/plugins/qa-changes/skills/github-pr-review/commands/github-pr-review.md +8 -0
- package/plugins/qa-changes/skills/github-pr-review/references/windows.md +47 -0
- package/plugins/qa-changes/skills/qa-changes/README.md +18 -0
- package/plugins/qa-changes/skills/qa-changes/SKILL.md +229 -0
- package/plugins/qa-changes/skills/qa-changes/commands/qa-changes.md +8 -0
- package/plugins/release-notes/.claude-plugin/plugin.json +19 -0
- package/plugins/release-notes/.codex-plugin/plugin.json +19 -0
- package/plugins/release-notes/skills/release-notes/README.md +24 -0
- package/plugins/release-notes/skills/release-notes/SKILL.md +19 -0
- package/plugins/release-notes/skills/release-notes/commands/release-notes.md +8 -0
- package/plugins/vulnerability-remediation/.claude-plugin/plugin.json +19 -0
- package/plugins/vulnerability-remediation/.codex-plugin/plugin.json +19 -0
- package/plugins/vulnerability-remediation/skills/github/.claude-plugin/plugin.json +19 -0
- package/plugins/vulnerability-remediation/skills/github/.codex-plugin/plugin.json +19 -0
- package/plugins/vulnerability-remediation/skills/github/.plugin/plugin.json +19 -0
- package/plugins/vulnerability-remediation/skills/github/README.md +42 -0
- package/plugins/vulnerability-remediation/skills/github/SKILL.md +107 -0
- package/plugins/vulnerability-remediation/skills/github/references/windows.md +48 -0
- package/plugins/vulnerability-remediation/skills/github/scripts/agent_conversation.py +143 -0
- package/plugins/vulnerability-remediation/skills/github/scripts/github_client.py +230 -0
- package/plugins/vulnerability-remediation/skills/security/.claude-plugin/plugin.json +18 -0
- package/plugins/vulnerability-remediation/skills/security/.codex-plugin/plugin.json +18 -0
- package/plugins/vulnerability-remediation/skills/security/.plugin/plugin.json +18 -0
- package/plugins/vulnerability-remediation/skills/security/README.md +38 -0
- package/plugins/vulnerability-remediation/skills/security/SKILL.md +33 -0
- package/pyproject.toml +2 -2
- package/python/openhands_extensions/_version.py +1 -1
- package/skills/add-javadoc/.claude-plugin/plugin.json +18 -0
- package/skills/add-javadoc/.codex-plugin/plugin.json +18 -0
- package/skills/add-skill/.claude-plugin/plugin.json +18 -0
- package/skills/add-skill/.codex-plugin/plugin.json +18 -0
- package/skills/agent-canvas-environment/.claude-plugin/plugin.json +19 -0
- package/skills/agent-canvas-environment/.codex-plugin/plugin.json +19 -0
- package/skills/agent-creator/.claude-plugin/plugin.json +20 -0
- package/skills/agent-creator/.codex-plugin/plugin.json +20 -0
- package/skills/agent-memory/.claude-plugin/plugin.json +18 -0
- package/skills/agent-memory/.codex-plugin/plugin.json +18 -0
- package/skills/agent-sdk-builder/.claude-plugin/plugin.json +18 -0
- package/skills/agent-sdk-builder/.codex-plugin/plugin.json +18 -0
- package/skills/azure-devops/.claude-plugin/plugin.json +18 -0
- package/skills/azure-devops/.codex-plugin/plugin.json +18 -0
- package/skills/bitbucket/.claude-plugin/plugin.json +17 -0
- package/skills/bitbucket/.codex-plugin/plugin.json +17 -0
- package/skills/bitbucket-cloud/.claude-plugin/plugin.json +18 -0
- package/skills/bitbucket-cloud/.codex-plugin/plugin.json +18 -0
- package/skills/bitbucket-data-center/.claude-plugin/plugin.json +19 -0
- package/skills/bitbucket-data-center/.codex-plugin/plugin.json +19 -0
- package/skills/code-review/.claude-plugin/plugin.json +19 -0
- package/skills/code-review/.codex-plugin/plugin.json +19 -0
- package/skills/code-simplifier/.claude-plugin/plugin.json +21 -0
- package/skills/code-simplifier/.codex-plugin/plugin.json +21 -0
- package/skills/datadog/.claude-plugin/plugin.json +19 -0
- package/skills/datadog/.codex-plugin/plugin.json +19 -0
- package/skills/deno/.claude-plugin/plugin.json +18 -0
- package/skills/deno/.codex-plugin/plugin.json +18 -0
- package/skills/discord/.claude-plugin/plugin.json +18 -0
- package/skills/discord/.codex-plugin/plugin.json +18 -0
- package/skills/docker/.claude-plugin/plugin.json +17 -0
- package/skills/docker/.codex-plugin/plugin.json +17 -0
- package/skills/evidence-based-citations/.claude-plugin/plugin.json +20 -0
- package/skills/evidence-based-citations/.codex-plugin/plugin.json +20 -0
- package/skills/flarglebargle/.claude-plugin/plugin.json +16 -0
- package/skills/flarglebargle/.codex-plugin/plugin.json +16 -0
- package/skills/frontend-design/.claude-plugin/plugin.json +21 -0
- package/skills/frontend-design/.codex-plugin/plugin.json +21 -0
- package/skills/github/.claude-plugin/plugin.json +19 -0
- package/skills/github/.codex-plugin/plugin.json +19 -0
- package/skills/github/scripts/agent_conversation.py +143 -0
- package/skills/github/scripts/github_client.py +230 -0
- package/skills/github-actions/.claude-plugin/plugin.json +19 -0
- package/skills/github-actions/.codex-plugin/plugin.json +19 -0
- package/skills/github-agents-md-maintainer/.claude-plugin/plugin.json +19 -0
- package/skills/github-agents-md-maintainer/.codex-plugin/plugin.json +19 -0
- package/skills/github-agents-md-maintainer/SKILL.md +7 -1
- package/skills/github-agents-md-maintainer/scripts/github_client.py +230 -0
- package/skills/github-agents-md-maintainer/scripts/main.py +4 -40
- package/skills/github-delivery-watchdog/.claude-plugin/plugin.json +9 -0
- package/skills/github-delivery-watchdog/.codex-plugin/plugin.json +9 -0
- package/skills/github-delivery-watchdog/.plugin/plugin.json +9 -0
- package/skills/github-delivery-watchdog/README.md +10 -0
- package/skills/github-delivery-watchdog/SKILL.md +35 -0
- package/skills/github-delivery-watchdog/commands/github-delivery-watchdog.md +8 -0
- package/skills/github-delivery-watchdog/scripts/github_client.py +230 -0
- package/skills/github-delivery-watchdog/scripts/worker.py +96 -0
- package/skills/github-issue-to-pr/.claude-plugin/plugin.json +19 -0
- package/skills/github-issue-to-pr/.codex-plugin/plugin.json +19 -0
- package/skills/github-issue-to-pr/SKILL.md +15 -1
- package/skills/github-issue-to-pr/scripts/agent_conversation.py +143 -0
- package/skills/github-issue-to-pr/scripts/github_client.py +230 -0
- package/skills/github-issue-to-pr/scripts/main.py +19 -50
- package/skills/github-issue-to-pr/scripts/worker.py +172 -0
- package/skills/github-issue-triage/.claude-plugin/plugin.json +9 -0
- package/skills/github-issue-triage/.codex-plugin/plugin.json +9 -0
- package/skills/github-issue-triage/.plugin/plugin.json +9 -0
- package/skills/github-issue-triage/README.md +9 -0
- package/skills/github-issue-triage/SKILL.md +34 -0
- package/skills/github-issue-triage/commands/github-issue-triage.md +8 -0
- package/skills/github-issue-triage/scripts/agent_conversation.py +143 -0
- package/skills/github-issue-triage/scripts/github_client.py +230 -0
- package/skills/github-issue-triage/scripts/worker.py +106 -0
- package/skills/github-pr-review/.claude-plugin/plugin.json +18 -0
- package/skills/github-pr-review/.codex-plugin/plugin.json +18 -0
- package/skills/github-pr-reviewer/.claude-plugin/plugin.json +20 -0
- package/skills/github-pr-reviewer/.codex-plugin/plugin.json +20 -0
- package/skills/github-pr-reviewer/SKILL.md +15 -1
- package/skills/github-pr-reviewer/scripts/agent_conversation.py +143 -0
- package/skills/github-pr-reviewer/scripts/github_client.py +230 -0
- package/skills/github-pr-reviewer/scripts/main.py +23 -49
- package/skills/github-pr-reviewer/scripts/worker.py +94 -0
- package/skills/github-repo-monitor/.claude-plugin/plugin.json +22 -0
- package/skills/github-repo-monitor/.codex-plugin/plugin.json +22 -0
- package/skills/github-repo-monitor/SKILL.md +7 -1
- package/skills/github-repo-monitor/scripts/github_client.py +230 -0
- package/skills/github-repo-monitor/scripts/main.py +4 -46
- package/skills/gitlab/.claude-plugin/plugin.json +17 -0
- package/skills/gitlab/.codex-plugin/plugin.json +17 -0
- package/skills/gitlab-issue-to-mr/.claude-plugin/plugin.json +19 -0
- package/skills/gitlab-issue-to-mr/.codex-plugin/plugin.json +19 -0
- package/skills/gitlab-issue-to-mr/.plugin/plugin.json +19 -0
- package/skills/gitlab-issue-to-mr/README.md +92 -0
- package/skills/gitlab-issue-to-mr/SKILL.md +408 -0
- package/skills/gitlab-issue-to-mr/commands/issue-to-mr-setup.md +8 -0
- package/skills/gitlab-issue-to-mr/references/state-schema.md +140 -0
- package/skills/gitlab-issue-to-mr/scripts/main.py +1448 -0
- package/skills/incident-retrospective/.claude-plugin/plugin.json +21 -0
- package/skills/incident-retrospective/.codex-plugin/plugin.json +21 -0
- package/skills/index.js +52 -6
- package/skills/iterate/.claude-plugin/plugin.json +13 -0
- package/skills/iterate/.codex-plugin/plugin.json +13 -0
- package/skills/jira-issue-to-pr/.claude-plugin/plugin.json +19 -0
- package/skills/jira-issue-to-pr/.codex-plugin/plugin.json +19 -0
- package/skills/jupyter/.claude-plugin/plugin.json +18 -0
- package/skills/jupyter/.codex-plugin/plugin.json +18 -0
- package/skills/kubernetes/.claude-plugin/plugin.json +18 -0
- package/skills/kubernetes/.codex-plugin/plugin.json +18 -0
- package/skills/learn-from-code-review/.claude-plugin/plugin.json +19 -0
- package/skills/learn-from-code-review/.codex-plugin/plugin.json +19 -0
- package/skills/linear/.claude-plugin/plugin.json +19 -0
- package/skills/linear/.codex-plugin/plugin.json +19 -0
- package/skills/linear-triage/.claude-plugin/plugin.json +21 -0
- package/skills/linear-triage/.codex-plugin/plugin.json +21 -0
- package/skills/news-digest/.claude-plugin/plugin.json +19 -0
- package/skills/news-digest/.codex-plugin/plugin.json +19 -0
- package/skills/notion/.claude-plugin/plugin.json +17 -0
- package/skills/notion/.codex-plugin/plugin.json +17 -0
- package/skills/npm/.claude-plugin/plugin.json +17 -0
- package/skills/npm/.codex-plugin/plugin.json +17 -0
- package/skills/openhands-api/.claude-plugin/plugin.json +22 -0
- package/skills/openhands-api/.codex-plugin/plugin.json +22 -0
- package/skills/openhands-automation/.claude-plugin/plugin.json +19 -0
- package/skills/openhands-automation/.codex-plugin/plugin.json +19 -0
- package/skills/openhands-automation/README.md +1 -1
- package/skills/openhands-automation/SKILL.md +18 -8
- package/skills/openhands-enterprise-troubleshooting/.claude-plugin/plugin.json +20 -0
- package/skills/openhands-enterprise-troubleshooting/.codex-plugin/plugin.json +20 -0
- package/skills/openhands-enterprise-troubleshooting/.plugin/plugin.json +20 -0
- package/skills/openhands-enterprise-troubleshooting/README.md +79 -0
- package/skills/openhands-enterprise-troubleshooting/SKILL.md +339 -0
- package/skills/openhands-enterprise-troubleshooting/references/diagnostics.md +698 -0
- package/skills/openhands-enterprise-troubleshooting/references/support-bundle-analysis.md +570 -0
- package/skills/openhands-enterprise-troubleshooting/scripts/bundle_triage.py +532 -0
- package/skills/openhands-sdk/.claude-plugin/plugin.json +20 -0
- package/skills/openhands-sdk/.codex-plugin/plugin.json +20 -0
- package/skills/openhands-sdk/SKILL.md +2 -0
- package/skills/pdflatex/.claude-plugin/plugin.json +18 -0
- package/skills/pdflatex/.codex-plugin/plugin.json +18 -0
- package/skills/plain-english-content/.claude-plugin/plugin.json +15 -0
- package/skills/plain-english-content/.codex-plugin/plugin.json +15 -0
- package/skills/prd/.claude-plugin/plugin.json +19 -0
- package/skills/prd/.codex-plugin/plugin.json +19 -0
- package/skills/research-brief/.claude-plugin/plugin.json +20 -0
- package/skills/research-brief/.codex-plugin/plugin.json +20 -0
- package/skills/security/.claude-plugin/plugin.json +18 -0
- package/skills/security/.codex-plugin/plugin.json +18 -0
- package/skills/skill-creator/.claude-plugin/plugin.json +17 -0
- package/skills/skill-creator/.codex-plugin/plugin.json +17 -0
- package/skills/slack-channel-monitor/.claude-plugin/plugin.json +21 -0
- package/skills/slack-channel-monitor/.codex-plugin/plugin.json +21 -0
- package/skills/slack-standup-digest/.claude-plugin/plugin.json +21 -0
- package/skills/slack-standup-digest/.codex-plugin/plugin.json +21 -0
- package/skills/spark-version-upgrade/.claude-plugin/plugin.json +20 -0
- package/skills/spark-version-upgrade/.codex-plugin/plugin.json +20 -0
- package/skills/ssh/.claude-plugin/plugin.json +18 -0
- package/skills/ssh/.codex-plugin/plugin.json +18 -0
- package/skills/swift-linux/.claude-plugin/plugin.json +17 -0
- package/skills/swift-linux/.codex-plugin/plugin.json +17 -0
- package/skills/technical-writing/.claude-plugin/plugin.json +15 -0
- package/skills/technical-writing/.codex-plugin/plugin.json +15 -0
- package/skills/theme-factory/.claude-plugin/plugin.json +19 -0
- package/skills/theme-factory/.codex-plugin/plugin.json +19 -0
- package/skills/ticket-to-code-change/.claude-plugin/plugin.json +21 -0
- package/skills/ticket-to-code-change/.codex-plugin/plugin.json +21 -0
- package/skills/upstream-fork-sync/.claude-plugin/plugin.json +21 -0
- package/skills/upstream-fork-sync/.codex-plugin/plugin.json +21 -0
- package/skills/uv/.claude-plugin/plugin.json +18 -0
- package/skills/uv/.codex-plugin/plugin.json +18 -0
- package/skills/vercel/.claude-plugin/plugin.json +18 -0
- package/skills/vercel/.codex-plugin/plugin.json +18 -0
- package/tests/fixtures/automations/capabilities.json +6 -3
- package/tests/fixtures/automations/github-pr-reviewer.json +64 -43
- package/tests/github_automation_helpers.py +31 -0
- package/tests/test_agent_conversation_dispatch.py +180 -0
- package/tests/test_automation_setup.py +3 -3
- package/tests/test_github_automation_foundation.py +73 -0
- package/tests/test_github_developer_delivery.py +150 -0
- package/tests/test_github_reviewer_delivery.py +110 -0
- package/tests/test_github_skill_installation.py +63 -0
- package/tests/test_github_triage_delivery.py +90 -0
- package/tests/test_github_watchdog_delivery.py +233 -0
- package/tests/test_gitlab_issue_to_mr.py +823 -0
- package/.pr/custom-automation-event-trigger.png +0 -0
- package/.pr/custom-automation-plugin-fields.png +0 -0
- package/.pr/custom-automation-prompt-review.png +0 -0
- package/.pr/custom-automation-prompt-scheduled.png +0 -0
- package/.pr/custom-automation-upload-fields.png +0 -0
|
@@ -58,6 +58,8 @@ jobs:
|
|
|
58
58
|
run: python scripts/sync_extensions.py --check
|
|
59
59
|
|
|
60
60
|
sync-sdk-skill:
|
|
61
|
+
permissions:
|
|
62
|
+
contents: read
|
|
61
63
|
runs-on: ubuntu-latest
|
|
62
64
|
steps:
|
|
63
65
|
- name: Checkout repository
|
|
@@ -69,4 +71,6 @@ jobs:
|
|
|
69
71
|
python-version: "3.12"
|
|
70
72
|
|
|
71
73
|
- name: Check SDK skill is up to date
|
|
74
|
+
env:
|
|
75
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
72
76
|
run: python scripts/sync_openhands_sdk_skill.py --check
|
|
@@ -56,14 +56,19 @@ jobs:
|
|
|
56
56
|
fi
|
|
57
57
|
echo "✓ npm $NPM_VERSION meets trusted publishing requirements"
|
|
58
58
|
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
|
|
59
|
+
# npm omits symlinks. Materialize shared resources in a release-only copy;
|
|
60
|
+
# retain the canonical linked source layout in the checkout.
|
|
61
|
+
- name: Stage package with linked resources
|
|
62
|
+
run: |
|
|
63
|
+
mkdir -p "$RUNNER_TEMP/extensions-package"
|
|
64
|
+
cp -RL . "$RUNNER_TEMP/extensions-package/"
|
|
62
65
|
|
|
63
66
|
- name: Verify package contents
|
|
67
|
+
working-directory: ${{ runner.temp }}/extensions-package
|
|
64
68
|
run: npm pack --dry-run
|
|
65
69
|
|
|
66
70
|
- name: Validate package version matches release tag
|
|
71
|
+
working-directory: ${{ runner.temp }}/extensions-package
|
|
67
72
|
env:
|
|
68
73
|
# Pass inputs.tag via env var to prevent script injection from
|
|
69
74
|
# GitHub Actions expression interpolation inside run blocks.
|
|
@@ -86,4 +91,5 @@ jobs:
|
|
|
86
91
|
echo "✓ Version $PACKAGE_VERSION matches release tag"
|
|
87
92
|
|
|
88
93
|
- name: Publish to npm with provenance
|
|
94
|
+
working-directory: ${{ runner.temp }}/extensions-package
|
|
89
95
|
run: npm publish --access public --provenance
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: PR Artifacts
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch: # Manual trigger for testing
|
|
6
|
+
pull_request_target:
|
|
7
|
+
types: [opened, synchronize, reopened, closed]
|
|
8
|
+
branches: [main]
|
|
9
|
+
pull_request_review:
|
|
10
|
+
types: [submitted]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
# Auto-remove .pr/ directory from same-repository PRs when approved.
|
|
14
|
+
cleanup-on-approval:
|
|
15
|
+
concurrency:
|
|
16
|
+
group: cleanup-pr-artifacts-${{ github.event.pull_request.number }}
|
|
17
|
+
cancel-in-progress: false
|
|
18
|
+
if: >-
|
|
19
|
+
github.event_name == 'pull_request_review' &&
|
|
20
|
+
github.event.review.state == 'approved' &&
|
|
21
|
+
github.event.pull_request.head.repo.full_name == github.repository
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
permissions:
|
|
24
|
+
contents: write
|
|
25
|
+
pull-requests: write
|
|
26
|
+
steps:
|
|
27
|
+
# Use PAT so the push triggers CI workflows that will complete and
|
|
28
|
+
# satisfy branch protection. We can't use [skip ci] because GitHub Apps
|
|
29
|
+
# can create stuck checks that block merging.
|
|
30
|
+
- uses: actions/checkout@v7
|
|
31
|
+
with:
|
|
32
|
+
ref: ${{ github.event.pull_request.head.ref }}
|
|
33
|
+
token: ${{ secrets.OPENHANDS_BOT_GITHUB_PAT_PUBLIC }}
|
|
34
|
+
|
|
35
|
+
- name: Remove .pr/ directory
|
|
36
|
+
id: remove
|
|
37
|
+
run: |
|
|
38
|
+
if [ -d ".pr" ]; then
|
|
39
|
+
git config user.name "allhands-bot"
|
|
40
|
+
git config user.email "allhands-bot@users.noreply.github.com"
|
|
41
|
+
git rm -rf .pr/
|
|
42
|
+
git commit -m "chore: Remove PR-only artifacts [automated]"
|
|
43
|
+
git push || {
|
|
44
|
+
echo "::error::Failed to push cleanup commit. Check branch protection rules."
|
|
45
|
+
exit 1
|
|
46
|
+
}
|
|
47
|
+
echo "removed=true" >> "$GITHUB_OUTPUT"
|
|
48
|
+
echo "::notice::Removed .pr/ directory"
|
|
49
|
+
else
|
|
50
|
+
echo "removed=false" >> "$GITHUB_OUTPUT"
|
|
51
|
+
echo "::notice::No .pr/ directory to remove"
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
- name: Update PR comment after cleanup
|
|
55
|
+
if: steps.remove.outputs.removed == 'true'
|
|
56
|
+
uses: actions/github-script@v9
|
|
57
|
+
with:
|
|
58
|
+
script: |
|
|
59
|
+
const marker = '<!-- pr-artifacts-notice -->';
|
|
60
|
+
const body = `${marker}
|
|
61
|
+
✅ **PR Artifacts Cleaned Up**
|
|
62
|
+
|
|
63
|
+
The \`.pr/\` directory has been automatically removed.
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
const comments = await github.paginate(
|
|
67
|
+
github.rest.issues.listComments,
|
|
68
|
+
{
|
|
69
|
+
owner: context.repo.owner,
|
|
70
|
+
repo: context.repo.repo,
|
|
71
|
+
issue_number: context.issue.number,
|
|
72
|
+
per_page: 100,
|
|
73
|
+
},
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
const existing = comments.find(c => c.body.includes(marker));
|
|
77
|
+
if (existing) {
|
|
78
|
+
await github.rest.issues.updateComment({
|
|
79
|
+
owner: context.repo.owner,
|
|
80
|
+
repo: context.repo.repo,
|
|
81
|
+
comment_id: existing.id,
|
|
82
|
+
body: body,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
# Inspect the fork through the API; never check out untrusted code with a write token.
|
|
87
|
+
check-pr-artifacts:
|
|
88
|
+
if: >-
|
|
89
|
+
github.event_name == 'pull_request_target' &&
|
|
90
|
+
github.event.action != 'closed'
|
|
91
|
+
runs-on: ubuntu-latest
|
|
92
|
+
permissions:
|
|
93
|
+
contents: read
|
|
94
|
+
pull-requests: write
|
|
95
|
+
steps:
|
|
96
|
+
- name: Post or update PR comment
|
|
97
|
+
uses: actions/github-script@v9
|
|
98
|
+
with:
|
|
99
|
+
script: |
|
|
100
|
+
const marker = '<!-- pr-artifacts-notice -->';
|
|
101
|
+
const pullRequest = context.payload.pull_request;
|
|
102
|
+
const headRepository = pullRequest.head.repo;
|
|
103
|
+
let exists = true;
|
|
104
|
+
|
|
105
|
+
try {
|
|
106
|
+
await github.rest.repos.getContent({
|
|
107
|
+
owner: headRepository.owner.login,
|
|
108
|
+
repo: headRepository.name,
|
|
109
|
+
path: '.pr',
|
|
110
|
+
ref: pullRequest.head.sha,
|
|
111
|
+
});
|
|
112
|
+
} catch (error) {
|
|
113
|
+
if (error.status === 404) {
|
|
114
|
+
exists = false;
|
|
115
|
+
} else {
|
|
116
|
+
throw error;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const comments = await github.paginate(
|
|
121
|
+
github.rest.issues.listComments,
|
|
122
|
+
{
|
|
123
|
+
owner: context.repo.owner,
|
|
124
|
+
repo: context.repo.repo,
|
|
125
|
+
issue_number: context.issue.number,
|
|
126
|
+
per_page: 100,
|
|
127
|
+
},
|
|
128
|
+
);
|
|
129
|
+
const existing = comments.find(c => c.body.includes(marker));
|
|
130
|
+
|
|
131
|
+
if (!exists) {
|
|
132
|
+
if (existing) {
|
|
133
|
+
await github.rest.issues.updateComment({
|
|
134
|
+
owner: context.repo.owner,
|
|
135
|
+
repo: context.repo.repo,
|
|
136
|
+
comment_id: existing.id,
|
|
137
|
+
body: `${marker}
|
|
138
|
+
✅ **PR Artifacts Cleaned Up**
|
|
139
|
+
|
|
140
|
+
The \`.pr/\` directory is no longer present.
|
|
141
|
+
`,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const isFork = headRepository.full_name !== context.payload.repository.full_name;
|
|
148
|
+
const cleanup = isFork
|
|
149
|
+
? 'Because this is a fork PR, the workflow will **open or update a cleanup PR against `main` after merge**.'
|
|
150
|
+
: 'The directory will be **automatically removed when the PR is approved**.';
|
|
151
|
+
const body = `${marker}
|
|
152
|
+
📁 **PR Artifacts Notice**
|
|
153
|
+
|
|
154
|
+
This PR contains a \`.pr/\` directory with temporary PR-specific documents. ${cleanup}
|
|
155
|
+
`;
|
|
156
|
+
|
|
157
|
+
core.warning('.pr/ directory contains temporary PR-only artifacts');
|
|
158
|
+
if (existing) {
|
|
159
|
+
await github.rest.issues.updateComment({
|
|
160
|
+
owner: context.repo.owner,
|
|
161
|
+
repo: context.repo.repo,
|
|
162
|
+
comment_id: existing.id,
|
|
163
|
+
body: body,
|
|
164
|
+
});
|
|
165
|
+
} else {
|
|
166
|
+
await github.rest.issues.createComment({
|
|
167
|
+
owner: context.repo.owner,
|
|
168
|
+
repo: context.repo.repo,
|
|
169
|
+
issue_number: context.issue.number,
|
|
170
|
+
body: body,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
# Fork branches cannot be modified reliably. If artifacts reach the trusted base,
|
|
175
|
+
# remove them through a pull request so branch protections remain enforced.
|
|
176
|
+
cleanup-after-merge:
|
|
177
|
+
concurrency:
|
|
178
|
+
group: cleanup-pr-artifacts-${{ github.event.pull_request.base.ref }}
|
|
179
|
+
cancel-in-progress: false
|
|
180
|
+
if: >-
|
|
181
|
+
github.event_name == 'pull_request_target' &&
|
|
182
|
+
github.event.action == 'closed' &&
|
|
183
|
+
github.event.pull_request.merged == true
|
|
184
|
+
runs-on: ubuntu-latest
|
|
185
|
+
permissions:
|
|
186
|
+
contents: write
|
|
187
|
+
pull-requests: write
|
|
188
|
+
steps:
|
|
189
|
+
- uses: actions/checkout@v7
|
|
190
|
+
with:
|
|
191
|
+
ref: ${{ github.event.pull_request.base.ref }}
|
|
192
|
+
token: ${{ secrets.OPENHANDS_BOT_GITHUB_PAT_PUBLIC }}
|
|
193
|
+
|
|
194
|
+
- name: Create or update cleanup PR
|
|
195
|
+
id: cleanup
|
|
196
|
+
env:
|
|
197
|
+
BASE_REF: ${{ github.event.pull_request.base.ref }}
|
|
198
|
+
CLEANUP_BRANCH: automation/remove-pr-artifacts
|
|
199
|
+
GH_TOKEN: ${{ secrets.OPENHANDS_BOT_GITHUB_PAT_PUBLIC }}
|
|
200
|
+
run: |
|
|
201
|
+
if [ ! -d ".pr" ]; then
|
|
202
|
+
echo "created=false" >> "$GITHUB_OUTPUT"
|
|
203
|
+
echo "::notice::No .pr/ directory to remove from $BASE_REF"
|
|
204
|
+
exit 0
|
|
205
|
+
fi
|
|
206
|
+
|
|
207
|
+
git config user.name "allhands-bot"
|
|
208
|
+
git config user.email "allhands-bot@users.noreply.github.com"
|
|
209
|
+
git fetch origin \
|
|
210
|
+
"+refs/heads/$CLEANUP_BRANCH:refs/remotes/origin/$CLEANUP_BRANCH" || true
|
|
211
|
+
git checkout -B "$CLEANUP_BRANCH"
|
|
212
|
+
git rm -rf .pr/
|
|
213
|
+
git commit \
|
|
214
|
+
-m "chore: remove merged PR artifacts" \
|
|
215
|
+
-m "Co-authored-by: openhands <openhands@all-hands.dev>"
|
|
216
|
+
git push --force-with-lease origin "HEAD:$CLEANUP_BRANCH"
|
|
217
|
+
|
|
218
|
+
cleanup_pr_url=$(gh pr list \
|
|
219
|
+
--base "$BASE_REF" \
|
|
220
|
+
--head "$CLEANUP_BRANCH" \
|
|
221
|
+
--state open \
|
|
222
|
+
--json url \
|
|
223
|
+
--jq '.[0].url')
|
|
224
|
+
|
|
225
|
+
if [ -z "$cleanup_pr_url" ]; then
|
|
226
|
+
cleanup_pr_url=$(gh pr create \
|
|
227
|
+
--base "$BASE_REF" \
|
|
228
|
+
--head "$CLEANUP_BRANCH" \
|
|
229
|
+
--title "chore: remove merged PR artifacts" \
|
|
230
|
+
--body-file - <<EOF
|
|
231
|
+
## Why
|
|
232
|
+
|
|
233
|
+
Temporary \`.pr/\` artifacts reached \`$BASE_REF\` through one or more merged PRs.
|
|
234
|
+
|
|
235
|
+
## Summary
|
|
236
|
+
|
|
237
|
+
- Remove the temporary \`.pr/\` directory from \`$BASE_REF\`.
|
|
238
|
+
|
|
239
|
+
## How to Test
|
|
240
|
+
|
|
241
|
+
- Confirm this PR only deletes files under \`.pr/\`.
|
|
242
|
+
- Let the required checks validate the cleanup commit.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
_This PR was automatically created by the PR Artifacts workflow._
|
|
247
|
+
EOF
|
|
248
|
+
)
|
|
249
|
+
fi
|
|
250
|
+
|
|
251
|
+
echo "created=true" >> "$GITHUB_OUTPUT"
|
|
252
|
+
echo "pr_url=$cleanup_pr_url" >> "$GITHUB_OUTPUT"
|
|
253
|
+
echo "::notice::Cleanup PR ready: $cleanup_pr_url"
|
|
254
|
+
|
|
255
|
+
- name: Update source PR comment
|
|
256
|
+
if: steps.cleanup.outputs.created == 'true'
|
|
257
|
+
uses: actions/github-script@v9
|
|
258
|
+
env:
|
|
259
|
+
CLEANUP_PR_URL: ${{ steps.cleanup.outputs.pr_url }}
|
|
260
|
+
with:
|
|
261
|
+
script: |
|
|
262
|
+
const marker = '<!-- pr-artifacts-notice -->';
|
|
263
|
+
const body = `${marker}
|
|
264
|
+
🧹 **PR Artifact Cleanup Queued**
|
|
265
|
+
|
|
266
|
+
The \`.pr/\` directory reached \`${context.payload.pull_request.base.ref}\` after merge. A cleanup PR has been opened or updated: ${process.env.CLEANUP_PR_URL}
|
|
267
|
+
`;
|
|
268
|
+
|
|
269
|
+
const comments = await github.paginate(
|
|
270
|
+
github.rest.issues.listComments,
|
|
271
|
+
{
|
|
272
|
+
owner: context.repo.owner,
|
|
273
|
+
repo: context.repo.repo,
|
|
274
|
+
issue_number: context.issue.number,
|
|
275
|
+
per_page: 100,
|
|
276
|
+
},
|
|
277
|
+
);
|
|
278
|
+
const existing = comments.find(c => c.body.includes(marker));
|
|
279
|
+
|
|
280
|
+
if (existing) {
|
|
281
|
+
await github.rest.issues.updateComment({
|
|
282
|
+
owner: context.repo.owner,
|
|
283
|
+
repo: context.repo.repo,
|
|
284
|
+
comment_id: existing.id,
|
|
285
|
+
body: body,
|
|
286
|
+
});
|
|
287
|
+
} else {
|
|
288
|
+
await github.rest.issues.createComment({
|
|
289
|
+
owner: context.repo.owner,
|
|
290
|
+
repo: context.repo.repo,
|
|
291
|
+
issue_number: context.issue.number,
|
|
292
|
+
body: body,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
@@ -17,13 +17,15 @@ jobs:
|
|
|
17
17
|
validate-pr-description:
|
|
18
18
|
name: Validate PR description
|
|
19
19
|
# Draft PRs may still have incomplete descriptions; validate when review starts.
|
|
20
|
-
# Release PRs are generated by
|
|
20
|
+
# Release and artifact-cleanup PRs are generated by trusted workflows without
|
|
21
21
|
# the standard human-authored PR template.
|
|
22
22
|
if: >-
|
|
23
23
|
github.event.pull_request.draft == false &&
|
|
24
24
|
github.event.pull_request.user.login != 'dependabot[bot]' &&
|
|
25
25
|
!(github.event.pull_request.head.repo.full_name == github.repository &&
|
|
26
|
-
startsWith(github.event.pull_request.head.ref, 'release-please-')
|
|
26
|
+
(startsWith(github.event.pull_request.head.ref, 'release-please-') ||
|
|
27
|
+
(github.event.pull_request.base.ref == 'main' &&
|
|
28
|
+
github.event.pull_request.head.ref == 'automation/remove-pr-artifacts')))
|
|
27
29
|
runs-on: ubuntu-latest
|
|
28
30
|
steps:
|
|
29
31
|
- name: Checkout trusted workflow scripts
|