mirror of
https://github.com/VoltAgent/awesome-openclaw-skills.git
synced 2026-06-14 20:04:56 +00:00
36 lines
1.3 KiB
YAML
36 lines
1.3 KiB
YAML
name: PR Description Check
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, edited, synchronize]
|
|
|
|
jobs:
|
|
check-links:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check PR description for required links
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
const body = context.payload.pull_request.body || '';
|
|
|
|
const hasClawhubLink = /https:\/\/clawhub\.ai\/[\w-]+\/[\w-]+/.test(body);
|
|
|
|
const errors = [];
|
|
if (!hasClawhubLink) {
|
|
errors.push('Missing ClawHub link (e.g. https://clawhub.ai/steipete/slack)');
|
|
}
|
|
|
|
if (errors.length > 0) {
|
|
const message = `## ❌ PR Description Check Failed\n\nYour PR description must include the required link:\n\n${errors.map(e => '- ' + e).join('\n')}\n\nThe skill must also be published on ClawHub with passing tests and a clean (non-suspicious) security status.\n\nSee [CONTRIBUTING.md](../blob/main/CONTRIBUTING.md#pr-description) for details.`;
|
|
|
|
await github.rest.issues.createComment({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: context.issue.number,
|
|
body: message
|
|
});
|
|
|
|
core.setFailed('PR description is missing the required ClawHub link.');
|
|
}
|