mirror of
https://github.com/VoltAgent/awesome-openclaw-skills.git
synced 2026-03-12 05:35:11 +00:00
update contribution guide
This commit is contained in:
39
.github/workflows/pr-check.yml
vendored
Normal file
39
.github/workflows/pr-check.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
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 hasGithubLink = /https:\/\/github\.com\/openclaw\/skills\/tree\/main\/skills\/[\w-]+\/[\w-]+/.test(body);
|
||||
|
||||
const errors = [];
|
||||
if (!hasClawhubLink) {
|
||||
errors.push('Missing ClawHub link (e.g. https://clawhub.ai/steipete/slack)');
|
||||
}
|
||||
if (!hasGithubLink) {
|
||||
errors.push('Missing GitHub link (e.g. https://github.com/openclaw/skills/tree/main/skills/steipete/slack)');
|
||||
}
|
||||
|
||||
if (errors.length > 0) {
|
||||
const message = `## ❌ PR Description Check Failed\n\nYour PR description must include both links:\n\n${errors.map(e => '- ' + e).join('\n')}\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 required links.');
|
||||
}
|
||||
Reference in New Issue
Block a user