Skip to content

Commit 837a968

Browse files
authored
github actions marketplace
1 parent d78071d commit 837a968

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

action.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: "Clean — Automated Draft PR & Fix Engine"
2+
description: "Creates draft PRs, applies fixes from issues, and checks PRs for typos."
3+
author: "HouseLearningCleaned[bot]"
4+
branding:
5+
icon: "check-circle"
6+
color: "blue"
7+
8+
inputs:
9+
mode:
10+
description: "Which Clean operation to run: create-pr | apply-fixes | typo-check"
11+
required: true
12+
issue-body:
13+
description: "Raw issue body text (for create-pr and apply-fixes)"
14+
required: false
15+
issue-number:
16+
description: "Issue number (for create-pr)"
17+
required: false
18+
repo:
19+
description: "owner/repo target"
20+
required: true
21+
token:
22+
description: "GitHub App token or PAT with repo permissions"
23+
required: true
24+
25+
runs:
26+
using: "composite"
27+
steps:
28+
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
34+
- name: Setup Node
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: 20
38+
39+
- name: Install dependencies
40+
shell: bash
41+
run: npm install
42+
43+
# -----------------------------
44+
# MODE: CREATE DRAFT PR
45+
# -----------------------------
46+
- name: Run create-pr script
47+
if: ${{ inputs.mode == 'create-pr' }}
48+
shell: bash
49+
run: |
50+
node scripts/generate_clean_pr.js
51+
env:
52+
GH_TOKEN: ${{ inputs.token }}
53+
ISSUE_BODY: ${{ inputs.issue-body }}
54+
ISSUE_NUMBER: ${{ inputs.issue-number }}
55+
REPO: ${{ inputs.repo }}
56+
57+
# -----------------------------
58+
# MODE: APPLY FIXES
59+
# -----------------------------
60+
- name: Run apply-fixes script
61+
if: ${{ inputs.mode == 'apply-fixes' }}
62+
shell: bash
63+
run: |
64+
node scripts/apply_fixes.js
65+
env:
66+
GH_TOKEN: ${{ inputs.token }}
67+
ISSUE_BODY: ${{ inputs.issue-body }}
68+
REPO: ${{ inputs.repo }}
69+
70+
# -----------------------------
71+
# MODE: TYPO CHECK
72+
# -----------------------------
73+
- name: Run typo checker
74+
if: ${{ inputs.mode == 'typo-check' }}
75+
shell: bash
76+
run: |
77+
node scripts/typo_check.js

0 commit comments

Comments
 (0)