Loading...
Loading...
Generate concise PR descriptions by analyzing the diff against a base branch
npx skill4agent add olshansk/agent-skills cmd-pr-descriptionPR_DESCRIPTION.mdcat PR_DESCRIPTION.md | pbcopyBASE_BRANCH=$(gh repo view --json defaultBranchRef -q '.defaultBranchRef.name' 2>/dev/null)BASE_BRANCH=$(git remote show origin 2>/dev/null | grep "HEAD branch" | cut -d: -f2 | xargs)BASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')mastermaingit diff $BASE_BRANCH --stat -- ":(exclude)*.lock" ":(exclude)package-lock.json" ":(exclude)pnpm-lock.yaml" ":(exclude)package.json"
git log $BASE_BRANCH..HEAD --onelinePR_DESCRIPTION.mdAskUserQuestiongh pr edit --body "$(cat PR_DESCRIPTION.md)"_tl;dr This is a single sentence summarizing the most important outcome of this PR in 100-200 characters._
## Summary
- **Subject/topic**: < 100 character explanation
- ...
- ...
## Feature Diff
| Component | Before | After |
| ---------------------------------- | ------------------------------------------ | ---------------------------------------- |
| 1-3 words describing the component | 1 sentence describing how it worked before | 1 sentence describing how it works after |
| ... | ... | ... |
| ... | ... | ... |
## Details
<details>
<summary>Technical Details</summary>
### Subsection Title
- **Subject/topic**: < 100 character explanation
- ...
### Another Subsection
- **Subject/topic**: < 100 character explanation
- ...
</details>N/ARemoved<details>file.pyget_user()/api/v1/usersfile.pyget_user()/api/v1/users_tl;dr Users can now log in with email/password and stay authenticated across browser sessions._
## Summary
- **Session-based login**: Users authenticate with email/password and maintain sessions across browser restarts
- **Faster auth checks**: Session lookups use an indexed token column instead of scanning the full users table
- **Remember-me support**: Users can opt into 30-day sessions instead of the default 24-hour expiry
## Feature Diff
| Component | Before | After |
| ---------------- | -------------------------- | ----------------------------------------------- |
| Auth method | API key only | Email/password + session cookie |
| Session duration | N/A | 24 hours (default), 30 days (remember-me) |
| `sessions` table | N/A | New table with `user_id`, `token`, `expires_at` |
| Token lookup | Full table scan on `users` | Indexed lookup on `sessions.token` |
| `/auth/login` | N/A | New endpoint |
| `/auth/logout` | N/A | New endpoint |
## Details
<details>
<summary>Technical Details</summary>
### Authentication Service
- **New login service**: Handles JWT issuance, session creation, and cookie management
- Add `login_service.py` with session create/validate/revoke methods
- Integrate `/auth/login` and `/auth/logout` endpoints in `routes/auth.py`
- Support `remember_me` flag to toggle 24h vs 30d expiry
### Database Schema
- **New sessions table**: Stores active sessions with automatic expiry
- Add `sessions` table with `user_id`, `token`, `expires_at` columns
- Add B-tree index on `token` for O(1) lookups
- Add index on `expires_at` for cleanup job performance
</details>