gitpadi 2.0.7 → 2.1.1
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/.gitlab/duo/chat-rules.md +40 -0
- package/.gitlab/duo/mr-review-instructions.md +44 -0
- package/.gitlab-ci.yml +136 -0
- package/README.md +585 -57
- package/action.yml +21 -2
- package/dist/applicant-scorer.js +27 -105
- package/dist/cli.js +1040 -34
- package/dist/commands/apply-for-issue.js +396 -0
- package/dist/commands/bounty-hunter.js +441 -0
- package/dist/commands/contribute.js +245 -51
- package/dist/commands/gitlab-issues.js +87 -0
- package/dist/commands/gitlab-mrs.js +163 -0
- package/dist/commands/gitlab-pipelines.js +95 -0
- package/dist/commands/prs.js +3 -3
- package/dist/core/github.js +24 -0
- package/dist/core/gitlab.js +233 -0
- package/dist/gitlab-agents/ci-recovery-agent.js +173 -0
- package/dist/gitlab-agents/contributor-scoring-agent.js +159 -0
- package/dist/gitlab-agents/grade-assignment-agent.js +252 -0
- package/dist/gitlab-agents/mr-review-agent.js +200 -0
- package/dist/gitlab-agents/reminder-agent.js +164 -0
- package/dist/grade-assignment.js +262 -0
- package/dist/remind-contributors.js +127 -0
- package/dist/review-and-merge.js +125 -0
- package/examples/gitpadi.yml +152 -0
- package/package.json +20 -4
- package/src/applicant-scorer.ts +33 -141
- package/src/cli.ts +1073 -33
- package/src/commands/apply-for-issue.ts +452 -0
- package/src/commands/bounty-hunter.ts +529 -0
- package/src/commands/contribute.ts +264 -50
- package/src/commands/gitlab-issues.ts +87 -0
- package/src/commands/gitlab-mrs.ts +185 -0
- package/src/commands/gitlab-pipelines.ts +104 -0
- package/src/commands/prs.ts +3 -3
- package/src/core/github.ts +24 -0
- package/src/core/gitlab.ts +397 -0
- package/src/gitlab-agents/ci-recovery-agent.ts +201 -0
- package/src/gitlab-agents/contributor-scoring-agent.ts +196 -0
- package/src/gitlab-agents/grade-assignment-agent.ts +275 -0
- package/src/gitlab-agents/mr-review-agent.ts +231 -0
- package/src/gitlab-agents/reminder-agent.ts +203 -0
- package/src/grade-assignment.ts +283 -0
- package/src/remind-contributors.ts +159 -0
- package/src/review-and-merge.ts +143 -0
package/README.md
CHANGED
|
@@ -1,102 +1,630 @@
|
|
|
1
|
-
#
|
|
1
|
+
# GitPadi
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> AI-powered GitHub & GitLab automation — from your terminal or straight into CI.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/gitpadi)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://github.com/Netwalls/contributor-agent)
|
|
8
|
+
|
|
9
|
+
Built by [Netwalls](https://github.com/Netwalls).
|
|
6
10
|
|
|
7
11
|
---
|
|
8
12
|
|
|
9
|
-
##
|
|
13
|
+
## What is GitPadi?
|
|
14
|
+
|
|
15
|
+
GitPadi is a CLI and GitHub Actions suite that automates the full lifecycle of open-source collaboration. Contributors can fork, submit PRs, fix CI failures, and reply to review comments without leaving the terminal. Maintainers can review PRs, score contributors, send escalating reminders, and auto-merge — all in one tool. Organizations and schools can create assignments, auto-grade student submissions across 5 criteria, and publish cohort leaderboards.
|
|
16
|
+
|
|
17
|
+
---
|
|
10
18
|
|
|
11
|
-
|
|
19
|
+
## Quick Start
|
|
12
20
|
|
|
13
|
-
### Start a new contribution
|
|
14
21
|
```bash
|
|
15
|
-
npx gitpadi
|
|
22
|
+
npx gitpadi
|
|
16
23
|
```
|
|
17
|
-
This single command:
|
|
18
|
-
1. **Forks** the repository to your account.
|
|
19
|
-
2. **Clones** it to your machine.
|
|
20
|
-
3. Sets up the **upstream remote**.
|
|
21
|
-
4. Creates a **fresh feature branch** linked to the issue.
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
Or add it to any repo in three steps:
|
|
26
|
+
|
|
27
|
+
1. Copy the [drop-in workflow](#drop-in-github-actions) to `.github/workflows/gitpadi.yml`
|
|
28
|
+
2. Push to your repo
|
|
29
|
+
3. Every PR is now auto-reviewed, scored, and merged if it passes
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
24
35
|
```bash
|
|
25
|
-
|
|
36
|
+
# Global install (recommended)
|
|
37
|
+
npm install -g gitpadi
|
|
38
|
+
|
|
39
|
+
# or with other package managers
|
|
40
|
+
yarn global add gitpadi
|
|
41
|
+
pnpm add -g gitpadi
|
|
42
|
+
|
|
43
|
+
# or run without installing
|
|
44
|
+
npx gitpadi
|
|
26
45
|
```
|
|
27
|
-
When you're done, this command:
|
|
28
|
-
1. **Stages** all your changes.
|
|
29
|
-
2. Creates a **commit** with a clean message.
|
|
30
|
-
3. **Pushes** to your fork.
|
|
31
|
-
4. Opens a **Pull Request** on the original repo, auto-linked to the issue.
|
|
32
46
|
|
|
33
47
|
---
|
|
34
48
|
|
|
35
|
-
##
|
|
49
|
+
## GitHub Authentication
|
|
50
|
+
|
|
51
|
+
On first launch, GitPadi asks for a **GitHub Personal Access Token**.
|
|
52
|
+
|
|
53
|
+
1. Go to [https://github.com/settings/tokens](https://github.com/settings/tokens)
|
|
54
|
+
2. Generate a new token (classic) with these scopes:
|
|
55
|
+
- `repo` — full control of private repos
|
|
56
|
+
- `read:org` — read org membership (optional, for org repos)
|
|
57
|
+
3. Paste the token when prompted
|
|
36
58
|
|
|
37
|
-
|
|
59
|
+
GitPadi stores your token locally at `~/.gitpadi/config.json`. It never leaves your machine.
|
|
60
|
+
|
|
61
|
+
You can also set the token via environment variable:
|
|
38
62
|
|
|
39
|
-
### 📋 Bulk Issue Creation
|
|
40
|
-
Create dozens of issues in seconds from a simple Markdown or JSON file.
|
|
41
63
|
```bash
|
|
42
|
-
|
|
64
|
+
export GITHUB_TOKEN=ghp_xxxxxxxxxxxx
|
|
43
65
|
```
|
|
44
|
-
*(Supports `## Heading` titles and `**Labels:**` tags).*
|
|
45
66
|
|
|
46
|
-
|
|
47
|
-
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## GitLab Authentication
|
|
70
|
+
|
|
71
|
+
GitPadi supports GitLab with full CLI and 5 Duo External AI agents.
|
|
72
|
+
|
|
73
|
+
1. Run `npx gitpadi`
|
|
74
|
+
2. Select **GitLab** from the platform selector
|
|
75
|
+
3. Enter your GitLab host (e.g. `https://gitlab.com`)
|
|
76
|
+
4. Paste your `glpat-xxxxxxxxxxxx` Personal Access Token
|
|
77
|
+
|
|
78
|
+
GitPadi stores the GitLab token alongside your GitHub token in `~/.gitpadi/config.json`.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Getting Started
|
|
83
|
+
|
|
48
84
|
```bash
|
|
49
|
-
npx gitpadi
|
|
85
|
+
npx gitpadi
|
|
50
86
|
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
87
|
+
|
|
88
|
+
You'll see the boot sequence, then a mode selector:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
⟨ GITPADI MODE SELECTOR ⟩
|
|
92
|
+
|
|
93
|
+
? Choose your path:
|
|
94
|
+
👤 Contributor Mode — fork, clone, sync, submit PRs
|
|
95
|
+
🛠️ Maintainer Mode — manage issues, PRs, contributors
|
|
96
|
+
🏫 Organization/School — assignments, grading, leaderboard
|
|
97
|
+
👋 Exit
|
|
54
98
|
```
|
|
55
99
|
|
|
56
|
-
|
|
57
|
-
- **Review PRs**: Get an automated review (size analysis, security checks, test coverage).
|
|
58
|
-
- **Fast Merge**: Squash and merge PRs directly from the CLI.
|
|
59
|
-
- **CI Status**: View GitHub Action logs for a PR without opening a browser.
|
|
100
|
+
Pick a mode and go. Type `q` at any text prompt to go back to the previous menu.
|
|
60
101
|
|
|
61
102
|
---
|
|
62
103
|
|
|
63
|
-
##
|
|
104
|
+
## Three CLI Modes
|
|
64
105
|
|
|
65
|
-
|
|
106
|
+
### Contributor Mode
|
|
107
|
+
|
|
108
|
+
For people contributing to repositories they don't own.
|
|
109
|
+
|
|
110
|
+
#### Start Contribution
|
|
111
|
+
|
|
112
|
+
Fork a repo, clone it locally, set up the upstream remote, and create a branch — all in one step.
|
|
66
113
|
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
|
|
114
|
+
```
|
|
115
|
+
? Contributor Action: 🚀 Start Contribution
|
|
116
|
+
? Enter Repo or Issue URL: https://github.com/org/project/issues/42
|
|
70
117
|
```
|
|
71
118
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
119
|
+
What happens:
|
|
120
|
+
1. Forks the repo to your account (skips if already forked)
|
|
121
|
+
2. Asks where to clone it
|
|
122
|
+
3. Clones your fork
|
|
123
|
+
4. Adds the original repo as `upstream`
|
|
124
|
+
5. Creates a branch named `fix/issue-42`
|
|
125
|
+
|
|
126
|
+
Accepts these input formats:
|
|
127
|
+
- `https://github.com/owner/repo`
|
|
128
|
+
- `https://github.com/owner/repo/issues/123`
|
|
129
|
+
- `owner/repo`
|
|
130
|
+
|
|
131
|
+
#### Sync with Upstream
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
? Contributor Action: 🔄 Sync with Upstream
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Fetches upstream, merges into your current branch, and warns about conflicts. Also runs automatically every time you open the Contributor menu.
|
|
138
|
+
|
|
139
|
+
#### View Action Logs
|
|
140
|
+
|
|
141
|
+
Shows CI/CD status of your latest commit with per-job breakdown.
|
|
142
|
+
|
|
77
143
|
```
|
|
144
|
+
📋 GitHub Actions status: ❌ Failure
|
|
145
|
+
|
|
146
|
+
✅ lint: success
|
|
147
|
+
❌ test: failure
|
|
148
|
+
→ Build failed. View details at: https://github.com/...
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
#### Submit PR
|
|
152
|
+
|
|
153
|
+
Stage, commit, push, and open a pull request in one go.
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
? Contributor Action: 🚀 Submit PR
|
|
157
|
+
🔍 Detected Issue #42 from branch... Fix the login bug
|
|
158
|
+
? 🚀 Ready to submit?
|
|
159
|
+
✅ Yes, use automated metadata
|
|
160
|
+
✍️ Edit title/message manually
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### Fix & Re-push
|
|
164
|
+
|
|
165
|
+
When your PR's CI fails, this walks you through fixing it.
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
🔧 Fix & Re-push Workflow
|
|
169
|
+
|
|
170
|
+
📋 GitHub Actions status: ❌ Failure
|
|
171
|
+
|
|
172
|
+
✅ lint: success
|
|
173
|
+
❌ test: failure
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
What happens:
|
|
177
|
+
1. Shows which CI checks failed
|
|
178
|
+
2. Waits for you to fix the code
|
|
179
|
+
3. Stages everything with `git add .`
|
|
180
|
+
4. Amends or creates a new commit
|
|
181
|
+
5. Force-pushes with `--force-with-lease`
|
|
182
|
+
6. Re-checks CI status
|
|
183
|
+
|
|
184
|
+
#### Reply to Comments
|
|
185
|
+
|
|
186
|
+
Read and reply to maintainer feedback on your PR without opening a browser.
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
💬 3 comment(s) on PR #15
|
|
190
|
+
|
|
191
|
+
@maintainer (src/auth.ts)
|
|
192
|
+
Can you add a test for the timeout case?
|
|
193
|
+
|
|
194
|
+
? Reply to @maintainer?
|
|
195
|
+
💬 Write a reply
|
|
196
|
+
⏩ Skip
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Fetches both general and inline code review comments. Inline replies stay inline.
|
|
78
200
|
|
|
79
201
|
---
|
|
80
202
|
|
|
81
|
-
|
|
203
|
+
### Maintainer Mode
|
|
204
|
+
|
|
205
|
+
For repository owners and collaborators. GitPadi validates your permissions before entering Maintainer Mode.
|
|
206
|
+
|
|
207
|
+
#### Issues
|
|
208
|
+
|
|
209
|
+
| Command | What it does |
|
|
210
|
+
|---------|-------------|
|
|
211
|
+
| List Issues | View open/closed issues in a formatted table |
|
|
212
|
+
| Create Issue | Create a new issue with title, body, and labels |
|
|
213
|
+
| Create from File | Bulk-create issues from a markdown or JSON file |
|
|
214
|
+
| Close Issue | Close an issue by number |
|
|
215
|
+
| Reopen Issue | Reopen a closed issue |
|
|
216
|
+
| Delete Issue | Permanently delete an issue (admin only) |
|
|
217
|
+
| Assign | Assign a user to an issue |
|
|
218
|
+
| Assign Best | Score all applicants and auto-assign the top one |
|
|
219
|
+
| Search | Search issues by keyword |
|
|
220
|
+
| Label | Add labels to an issue |
|
|
221
|
+
|
|
222
|
+
#### Pull Requests
|
|
223
|
+
|
|
224
|
+
| Command | What it does |
|
|
225
|
+
|---------|-------------|
|
|
226
|
+
| List PRs | View open/closed pull requests |
|
|
227
|
+
| Review & Merge | Review PR + check CI + squash merge from the terminal |
|
|
228
|
+
| Merge PR | Merge with squash, merge commit, or rebase |
|
|
229
|
+
| Close PR | Close without merging |
|
|
230
|
+
| Review | Show the full PR review table (files, size, checks) |
|
|
231
|
+
| Approve | Submit an approval review |
|
|
232
|
+
| Diff | Show the diff for a PR |
|
|
233
|
+
|
|
234
|
+
When CI fails, GitPadi posts a comment on the PR pointing the contributor to the Fix & Re-push workflow.
|
|
235
|
+
|
|
236
|
+
#### Repositories
|
|
237
|
+
|
|
238
|
+
| Command | What it does |
|
|
239
|
+
|---------|-------------|
|
|
240
|
+
| Create | Create a new repo (personal or org) |
|
|
241
|
+
| Delete | Delete a repository |
|
|
242
|
+
| Clone | Clone a repo locally |
|
|
243
|
+
| Info | Show repo stats (stars, forks, issues, language) |
|
|
244
|
+
| Topics | Set repository topics |
|
|
245
|
+
| List | List all repos for a user or org |
|
|
246
|
+
|
|
247
|
+
#### Contributors
|
|
248
|
+
|
|
249
|
+
| Command | What it does |
|
|
250
|
+
|---------|-------------|
|
|
251
|
+
| Score Applicants | Score everyone who commented on an issue based on GitHub profile, PR history, and activity |
|
|
252
|
+
| Rank | Sort and display ranked contributors |
|
|
253
|
+
| Assign Best | Auto-assign the highest-scoring S or A tier applicant |
|
|
254
|
+
|
|
255
|
+
#### Releases
|
|
256
|
+
|
|
257
|
+
| Command | What it does |
|
|
258
|
+
|---------|-------------|
|
|
259
|
+
| Create | Create a new GitHub release with tag and notes |
|
|
260
|
+
| List | List existing releases |
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
### Organization / School Mode
|
|
265
|
+
|
|
266
|
+
**Menu:** `npx gitpadi` → `🏫 Organization/School`
|
|
267
|
+
|
|
268
|
+
Built for instructors managing student cohorts.
|
|
269
|
+
|
|
270
|
+
#### Create Assignment
|
|
271
|
+
|
|
272
|
+
Creates a GitHub issue with the assignment description, deadline, submission instructions, and grading rubric pre-filled.
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
? Assignment title: Build a REST API
|
|
276
|
+
? Description: Create a Node.js REST API with CRUD endpoints...
|
|
277
|
+
? Deadline: March 15, 2026
|
|
278
|
+
? Expected files: src/routes.ts, src/models.ts, tests/
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Students fork the repo, complete the work, and open a PR with `Fixes #<issue-number>`.
|
|
282
|
+
|
|
283
|
+
#### Grade a PR
|
|
82
284
|
|
|
83
|
-
|
|
285
|
+
Manually grade a specific PR from the terminal.
|
|
286
|
+
|
|
287
|
+
```
|
|
288
|
+
📊 Grade for @student1 — PR #15
|
|
289
|
+
Assignment: Build a REST API (#3)
|
|
290
|
+
Changes: 142 lines across 5 files
|
|
291
|
+
CI: ✅ Passed
|
|
292
|
+
Tests: 2 file(s)
|
|
293
|
+
|
|
294
|
+
Score: 85/100 — Grade A 🟢
|
|
295
|
+
|
|
296
|
+
✅ Grade posted to PR.
|
|
297
|
+
? Merge this PR? ✅ Yes, squash & merge
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
#### Cohort Leaderboard
|
|
301
|
+
|
|
302
|
+
Ranks all students by their average grade across all assignments.
|
|
303
|
+
|
|
304
|
+
```
|
|
305
|
+
🏆 COHORT LEADERBOARD
|
|
306
|
+
|
|
307
|
+
| Rank | Student | Avg Score | Assignments | Grades |
|
|
308
|
+
|------|-----------|-----------|-------------|---------|
|
|
309
|
+
| 🥇 | @alice | 88/100 | 3 | A, A, B |
|
|
310
|
+
| 🥈 | @bob | 72/100 | 3 | B, B, A |
|
|
311
|
+
| 🥉 | @charlie | 65/100 | 2 | B, C |
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Optionally posts the leaderboard to a pinned GitHub issue.
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Drop-in GitHub Actions
|
|
319
|
+
|
|
320
|
+
Copy this into `.github/workflows/gitpadi.yml` — no other setup needed.
|
|
84
321
|
|
|
85
|
-
**Auto-Score Applicants:**
|
|
86
322
|
```yaml
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
323
|
+
# .github/workflows/gitpadi.yml
|
|
324
|
+
# Copy this file to any repo — no setup needed.
|
|
325
|
+
|
|
326
|
+
name: GitPadi
|
|
327
|
+
|
|
328
|
+
on:
|
|
329
|
+
pull_request:
|
|
330
|
+
types: [opened, synchronize, reopened]
|
|
331
|
+
issue_comment:
|
|
332
|
+
types: [created]
|
|
333
|
+
schedule:
|
|
334
|
+
- cron: '0 9 * * *'
|
|
335
|
+
workflow_dispatch:
|
|
336
|
+
inputs:
|
|
337
|
+
action:
|
|
338
|
+
type: choice
|
|
339
|
+
options: [review-and-merge, create-issues, remind-contributors]
|
|
340
|
+
|
|
341
|
+
permissions:
|
|
342
|
+
contents: write
|
|
343
|
+
issues: write
|
|
344
|
+
pull-requests: write
|
|
345
|
+
|
|
346
|
+
jobs:
|
|
347
|
+
review-pr:
|
|
348
|
+
if: github.event_name == 'pull_request'
|
|
349
|
+
runs-on: ubuntu-latest
|
|
350
|
+
steps:
|
|
351
|
+
- uses: actions/checkout@v4
|
|
352
|
+
- uses: Netwalls/contributor-agent@main
|
|
353
|
+
with:
|
|
354
|
+
action: review-pr
|
|
355
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
356
|
+
|
|
357
|
+
score-applicant:
|
|
358
|
+
if: github.event_name == 'issue_comment'
|
|
359
|
+
runs-on: ubuntu-latest
|
|
360
|
+
steps:
|
|
361
|
+
- uses: actions/checkout@v4
|
|
362
|
+
- uses: Netwalls/contributor-agent@main
|
|
363
|
+
with:
|
|
364
|
+
action: score-applicant
|
|
365
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
366
|
+
|
|
367
|
+
remind-contributors:
|
|
368
|
+
if: github.event_name == 'schedule'
|
|
369
|
+
runs-on: ubuntu-latest
|
|
370
|
+
steps:
|
|
371
|
+
- uses: actions/checkout@v4
|
|
372
|
+
- uses: Netwalls/contributor-agent@main
|
|
373
|
+
with:
|
|
374
|
+
action: remind-contributors
|
|
375
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
90
376
|
```
|
|
91
377
|
|
|
92
|
-
|
|
378
|
+
### What each job does
|
|
379
|
+
|
|
380
|
+
| Job | Trigger | What it does |
|
|
381
|
+
|-----|---------|-------------|
|
|
382
|
+
| `review-pr` | `pull_request` | Post automated PR review (size, tests, commit style, CI status) |
|
|
383
|
+
| `score-applicant` | `issue_comment` | Score and rank applicants when someone comments on an issue |
|
|
384
|
+
| `remind-contributors` | `schedule` (daily 9am) | Send tiered reminders to inactive assignees; auto-unassign at 72h |
|
|
385
|
+
|
|
386
|
+
### Assignment mode opt-in
|
|
387
|
+
|
|
388
|
+
To enable automatic assignment grading, add this environment variable to the `review-pr` job:
|
|
389
|
+
|
|
93
390
|
```yaml
|
|
94
|
-
-
|
|
95
|
-
|
|
96
|
-
|
|
391
|
+
review-pr:
|
|
392
|
+
if: github.event_name == 'pull_request'
|
|
393
|
+
runs-on: ubuntu-latest
|
|
394
|
+
env:
|
|
395
|
+
GITPADI_ASSIGNMENT_MODE: 'true'
|
|
396
|
+
steps:
|
|
397
|
+
- uses: actions/checkout@v4
|
|
398
|
+
- uses: Netwalls/contributor-agent@main
|
|
399
|
+
with:
|
|
400
|
+
action: grade-assignment
|
|
401
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
402
|
+
pass-threshold: 40
|
|
97
403
|
```
|
|
98
404
|
|
|
405
|
+
### All available actions
|
|
406
|
+
|
|
407
|
+
| Action | Trigger | What it does |
|
|
408
|
+
|--------|---------|-------------|
|
|
409
|
+
| `review-pr` | `pull_request` | Automated PR quality review |
|
|
410
|
+
| `review-and-merge` | `pull_request` | Review + CI check + auto-merge if passing |
|
|
411
|
+
| `grade-assignment` | `pull_request` | Grade student submissions + post grade card + auto-merge |
|
|
412
|
+
| `score-applicant` | `issue_comment` | Score and rank applicants on issues |
|
|
413
|
+
| `remind-contributors` | `schedule` | Tiered reminders (24h/48h/72h) to inactive assignees |
|
|
414
|
+
| `create-issues` | Manual/workflow | Bulk-create issues from a file |
|
|
415
|
+
|
|
416
|
+
### All `with:` inputs
|
|
417
|
+
|
|
418
|
+
| Input | Required | Default | Description |
|
|
419
|
+
|-------|----------|---------|-------------|
|
|
420
|
+
| `action` | Yes | — | One of the actions listed above |
|
|
421
|
+
| `github-token` | Yes | — | Use `${{ secrets.GITHUB_TOKEN }}` |
|
|
422
|
+
| `auto-merge` | No | `false` | Auto-merge PR if CI passes and no critical issues |
|
|
423
|
+
| `pass-threshold` | No | `40` | Minimum score (0–100) to auto-merge a graded assignment |
|
|
424
|
+
| `anthropic-api-key` | No | — | Optional Claude API key for AI-enhanced reviews |
|
|
425
|
+
|
|
99
426
|
---
|
|
100
427
|
|
|
101
|
-
##
|
|
102
|
-
|
|
428
|
+
## GitLab Support
|
|
429
|
+
|
|
430
|
+
GitPadi v2.1 ships full GitLab support: a complete CLI for GitLab issues, MRs, and pipelines, plus 5 Duo External Agents powered by Claude AI.
|
|
431
|
+
|
|
432
|
+
### GitLab CLI
|
|
433
|
+
|
|
434
|
+
From the mode selector, choose **GitLab** to access:
|
|
435
|
+
|
|
436
|
+
- **Issues** — list, create, close, assign, search, label
|
|
437
|
+
- **Merge Requests** — list, review, merge, close, approve, diff
|
|
438
|
+
- **Pipelines** — list pipeline runs, view job logs, retry failed jobs
|
|
439
|
+
- **Repositories** — list, clone, fork, create
|
|
440
|
+
|
|
441
|
+
### 5 Duo External Agents
|
|
442
|
+
|
|
443
|
+
Add these to your GitLab project's Duo External Agent configuration:
|
|
444
|
+
|
|
445
|
+
| Agent | What it does |
|
|
446
|
+
|-------|-------------|
|
|
447
|
+
| `contributor-scoring` | Score and rank applicants who comment on issues |
|
|
448
|
+
| `mr-review` | Automated MR quality review and inline feedback |
|
|
449
|
+
| `ci-recovery` | Diagnose pipeline failures and guide the contributor to a fix |
|
|
450
|
+
| `reminder` | Escalating reminders for inactive assignees (24h→48h→72h) |
|
|
451
|
+
| `grade-assignment` | Grade student MRs against the 5-criteria rubric |
|
|
452
|
+
|
|
453
|
+
### `.gitlab-ci.yml` setup
|
|
454
|
+
|
|
455
|
+
```yaml
|
|
456
|
+
gitpadi-review:
|
|
457
|
+
image: node:20
|
|
458
|
+
script:
|
|
459
|
+
- npx gitpadi@latest ci-run
|
|
460
|
+
variables:
|
|
461
|
+
GITLAB_TOKEN: $GITLAB_TOKEN
|
|
462
|
+
AI_FLOW_AI_GATEWAY_TOKEN: $AI_FLOW_AI_GATEWAY_TOKEN
|
|
463
|
+
rules:
|
|
464
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
### Environment variables for GitLab
|
|
468
|
+
|
|
469
|
+
| Variable | Purpose |
|
|
470
|
+
|----------|---------|
|
|
471
|
+
| `GITLAB_TOKEN` | GitLab Personal Access Token (`glpat-...`) |
|
|
472
|
+
| `GITLAB_HOST` | Your GitLab host (default: `https://gitlab.com`) |
|
|
473
|
+
| `AI_FLOW_AI_GATEWAY_TOKEN` | GitLab AI Gateway token for Duo agents |
|
|
474
|
+
| `ANTHROPIC_API_KEY` | Alternative: use your own Claude API key |
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
## Grading Rubric
|
|
479
|
+
|
|
480
|
+
Student PRs are scored on 5 criteria totaling 100 points:
|
|
481
|
+
|
|
482
|
+
| Criteria | Points | What's checked |
|
|
483
|
+
|----------|--------|----------------|
|
|
484
|
+
| CI Passing | 25 | All GitHub Actions checks are green |
|
|
485
|
+
| Assignment Relevance | 25 | PR matches the assignment scope and issue description |
|
|
486
|
+
| Test Coverage | 20 | Tests are included with source changes |
|
|
487
|
+
| Code Quality | 15 | Clean commits, reasonable PR size, no obvious issues |
|
|
488
|
+
| Submission Format | 15 | Branch name, issue reference (`Fixes #N`), PR body |
|
|
489
|
+
|
|
490
|
+
Grade thresholds:
|
|
491
|
+
|
|
492
|
+
| Grade | Score |
|
|
493
|
+
|-------|-------|
|
|
494
|
+
| A | 80 – 100 |
|
|
495
|
+
| B | 60 – 79 |
|
|
496
|
+
| C | 40 – 59 |
|
|
497
|
+
| D | 20 – 39 |
|
|
498
|
+
| F | 0 – 19 |
|
|
499
|
+
|
|
500
|
+
---
|
|
501
|
+
|
|
502
|
+
## Contributor Scoring
|
|
503
|
+
|
|
504
|
+
When a maintainer runs **Score Applicants** (or the `score-applicant` Action fires), GitPadi evaluates everyone who commented on an issue.
|
|
505
|
+
|
|
506
|
+
### Scoring factors
|
|
507
|
+
|
|
508
|
+
- GitHub account age and activity
|
|
509
|
+
- Number of merged PRs
|
|
510
|
+
- Contribution quality and frequency
|
|
511
|
+
- Relevance to the issue
|
|
512
|
+
|
|
513
|
+
### Tiers
|
|
514
|
+
|
|
515
|
+
| Tier | Meaning |
|
|
516
|
+
|------|---------|
|
|
517
|
+
| S | Exceptional — immediately eligible for auto-assign |
|
|
518
|
+
| A | Strong — eligible for auto-assign |
|
|
519
|
+
| B | Competent |
|
|
520
|
+
| C | Developing |
|
|
521
|
+
| D | Limited history |
|
|
522
|
+
|
|
523
|
+
**Auto-assign behavior:** When `Assign Best` is triggered (CLI or Action), GitPadi picks the highest-scoring S or A tier applicant and assigns them to the issue.
|
|
524
|
+
|
|
525
|
+
---
|
|
526
|
+
|
|
527
|
+
## Escalating Reminders
|
|
528
|
+
|
|
529
|
+
The `remind-contributors` action runs daily at 9am UTC (or on whatever schedule you configure). It checks every issue with an assigned contributor and escalates based on inactivity:
|
|
530
|
+
|
|
531
|
+
| Time since assignment | Action |
|
|
532
|
+
|-----------------------|--------|
|
|
533
|
+
| 24 hours | Posts a friendly nudge: "Please create a draft PR to show progress" |
|
|
534
|
+
| 48 hours (no draft PR) | Posts a warning: "You'll be unassigned in 24h if no PR is opened" |
|
|
535
|
+
| 72 hours (still no PR) | Auto-unassigns the contributor and reopens the issue |
|
|
536
|
+
|
|
537
|
+
GitPadi checks for linked draft PRs before escalating — contributors with a draft PR are never reminded. Unique comment signatures prevent duplicate posts.
|
|
538
|
+
|
|
539
|
+
---
|
|
540
|
+
|
|
541
|
+
## Configuration
|
|
542
|
+
|
|
543
|
+
GitPadi stores config at `~/.gitpadi/config.json`:
|
|
544
|
+
|
|
545
|
+
```json
|
|
546
|
+
{
|
|
547
|
+
"token": "ghp_xxxxxxxxxxxx",
|
|
548
|
+
"gitlabToken": "glpat-xxxxxxxxxxxx",
|
|
549
|
+
"gitlabHost": "https://gitlab.com",
|
|
550
|
+
"owner": "your-org",
|
|
551
|
+
"repo": "your-repo"
|
|
552
|
+
}
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
Environment variables take priority over the config file:
|
|
556
|
+
|
|
557
|
+
| Variable | Purpose |
|
|
558
|
+
|----------|---------|
|
|
559
|
+
| `GITHUB_TOKEN` or `GITPADI_TOKEN` | GitHub authentication |
|
|
560
|
+
| `GITHUB_OWNER` | Repository owner |
|
|
561
|
+
| `GITHUB_REPO` | Repository name |
|
|
562
|
+
| `GITLAB_TOKEN` | GitLab authentication |
|
|
563
|
+
| `GITLAB_HOST` | GitLab instance URL |
|
|
564
|
+
| `AI_FLOW_AI_GATEWAY_TOKEN` | GitLab AI Gateway token |
|
|
565
|
+
| `ANTHROPIC_API_KEY` | Claude API key (optional enhancement) |
|
|
566
|
+
|
|
567
|
+
GitPadi also auto-detects the repository from your local `.git/config` when run inside a git directory.
|
|
568
|
+
|
|
569
|
+
---
|
|
570
|
+
|
|
571
|
+
## Changelog
|
|
572
|
+
|
|
573
|
+
### v2.1.0
|
|
574
|
+
|
|
575
|
+
**GitLab**
|
|
576
|
+
- Full GitLab CLI: issues, MRs, pipelines, repositories
|
|
577
|
+
- 5 Duo External Agents: `contributor-scoring`, `mr-review`, `ci-recovery`, `reminder`, `grade-assignment`
|
|
578
|
+
- GitLab authentication flow with host + `glpat-` token
|
|
579
|
+
|
|
580
|
+
**GitHub**
|
|
581
|
+
- Auto-assign: top S/A tier contributor automatically assigned after scoring
|
|
582
|
+
- Auto-close: linked issues automatically closed when PR is merged
|
|
583
|
+
- `score-applicant` Action now triggers on `issue_comment` events
|
|
584
|
+
|
|
585
|
+
### v2.0.0
|
|
586
|
+
|
|
587
|
+
**Contributor**
|
|
588
|
+
- Fix & Re-push workflow for CI failures
|
|
589
|
+
- Reply to maintainer comments from the terminal
|
|
590
|
+
|
|
591
|
+
**Maintainer**
|
|
592
|
+
- Review & Merge: review PR + CI check + squash merge in one flow
|
|
593
|
+
- `review-and-merge` GitHub Action with `auto-merge` support
|
|
594
|
+
|
|
595
|
+
**Organization / School**
|
|
596
|
+
- Third CLI mode: Create Assignment, Grade PR, Cohort Leaderboard
|
|
597
|
+
- `grade-assignment` GitHub Action with 5-criteria scoring and auto-merge
|
|
598
|
+
- Grade card posted as a PR comment with full breakdown
|
|
599
|
+
|
|
600
|
+
**Reminders**
|
|
601
|
+
- Upgraded from flat 2-day poke to 3-tier escalation (24h → 48h → 72h)
|
|
602
|
+
- Draft PR detection: skips reminders if contributor has a linked PR
|
|
603
|
+
- Auto-unassign at 72h
|
|
604
|
+
|
|
605
|
+
### v1.0.0
|
|
606
|
+
|
|
607
|
+
**Contributor**
|
|
608
|
+
- Fork & Clone automation
|
|
609
|
+
- Upstream sync (API sync + local merge)
|
|
610
|
+
- CI log viewer
|
|
611
|
+
- One-command PR submission with auto-detected issue metadata
|
|
612
|
+
|
|
613
|
+
**Maintainer**
|
|
614
|
+
- Full issue management (create, close, reopen, delete, assign, search, label, bulk-create)
|
|
615
|
+
- Pull request management (list, merge, close, review, approve, diff)
|
|
616
|
+
- Repository management (create, delete, clone, info, topics, list)
|
|
617
|
+
- Contributor scoring and ranking
|
|
618
|
+
- Release management
|
|
619
|
+
|
|
620
|
+
**GitHub Actions**
|
|
621
|
+
- `create-issues` — bulk issue creation from file
|
|
622
|
+
- `review-pr` — automated PR quality review
|
|
623
|
+
- `score-applicant` — contributor scoring on issues
|
|
624
|
+
- `remind-contributors` — automated contributor reminders
|
|
625
|
+
|
|
626
|
+
---
|
|
627
|
+
|
|
628
|
+
## License
|
|
629
|
+
|
|
630
|
+
MIT — [Netwalls](https://github.com/Netwalls)
|