Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/scripts/post-hackernews.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ async function postHackerNews({ context }) {
await page.goto("https://news.ycombinator.com/submit");
await page.waitForLoadState("networkidle");

// Submit story
const title = context.payload.pull_request.title.substring(0, 80);
const description = context.payload.pull_request.body;
// Extract social media post from PR body if present
const description = context.payload.pull_request.body || "";
let socialPost = null;
const socialMediaMatch = description.match(/## Social Media Post\s*\n([\s\S]*?)(?=\n##|\n$|$)/i);
if (socialMediaMatch)
socialPost = socialMediaMatch[1].trim();

// Use social media post if available, otherwise PR title
const title = (socialPost || context.payload.pull_request.title).substring(0, 80);
const url = "https://gitauto.ai?utm_source=hackernews&utm_medium=referral"
await page.fill('input[name="title"]', title);
await page.fill('input[name="url"]', url);
Expand Down
14 changes: 12 additions & 2 deletions .github/scripts/post-linkedin.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,21 @@ async function postLinkedIn({ context }) {
const accessToken = process.env.LINKEDIN_ACCESS_TOKEN;

const message = "🚀 New release";
let title = context.payload.pull_request.title;
const description = context.payload.pull_request.body || "";
const url = "https://gitauto.ai?utm_source=linkedin&utm_medium=referral"

if (title.endsWith('…') && description) {
// Extract social media post from PR body if present
let socialPost = null;
const socialMediaMatch = description.match(/## Social Media Post\s*\n([\s\S]*?)(?=\n##|\n$|$)/i);
if (socialMediaMatch) {
socialPost = socialMediaMatch[1].trim();
}

// Fallback to PR title if no social media section
let title = socialPost || context.payload.pull_request.title;

// Handle truncated titles with continuation in body
if (!socialPost && title.endsWith('…') && description) {
const firstLine = description.split('\n')[0];
if (firstLine.startsWith('…')) {
title = title.slice(0, -1) + firstLine.slice(1);
Expand Down
14 changes: 12 additions & 2 deletions .github/scripts/post-twitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,20 @@ async function postTwitter({ context }) {
});

const message = "🚀 New release";
let title = context.payload.pull_request.title;
const description = context.payload.pull_request.body || "";

if (title.endsWith('…') && description) {
// Extract social media post from PR body if present
let socialPost = null;
const socialMediaMatch = description.match(/## Social Media Post\s*\n([\s\S]*?)(?=\n##|\n$|$)/i);
if (socialMediaMatch) {
socialPost = socialMediaMatch[1].trim();
}

// Fallback to PR title if no social media section
let title = socialPost || context.payload.pull_request.title;

// Handle truncated titles with continuation in body
if (!socialPost && title.endsWith('…') && description) {
const firstLine = description.split('\n')[0];
if (firstLine.startsWith('…')) {
title = title.slice(0, -1) + firstLine.slice(1);
Expand Down
24 changes: 23 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,30 @@ When the user says "LGTM" (Looks Good To Me), automatically execute this workflo
- Ensure deleted files are staged (they should already be if renamed with `mv`)
- Use specific file names: `git add file1.py file2.py file3.py` (**NEVER use `git add .`**)
- For deleted files already staged, they'll be included automatically in the commit
12. Commit with descriptive message: `git commit -m "descriptive message"` (NO Claude credits in commit message)
12. Commit with descriptive message: `git commit -m "descriptive message"`
- **CRITICAL**: NEVER include Claude Code credits or co-author lines in commit messages
- NO "🤖 Generated with [Claude Code]" footer
- NO "Co-Authored-By: Claude <noreply@anthropic.com>" lines
- Keep commit messages professional and focused on the actual changes
13. Push to remote: `git push`
14. Create pull request:

```bash
gh pr create --title "PR title" --body "$(cat <<'EOF'
## Social Media Post
Marketing-focused message about GitAuto benefits for customers
EOF
)"
```

- PR title should be technical and descriptive
- **CRITICAL**: Social Media Post section is REQUIRED - will be used for X/LinkedIn/HN posts
- Social Media Post must:
- Be concise and fit in a tweet (under 280 characters is ideal)
- Mention "GitAuto" by name
- Explain WHAT changed in practical terms
- Highlight WHY it matters - benefits for existing or potential GitAuto customers
- Example: "GitAuto now prevents editing unrelated files with repository-level restrictions - safer automated PR generation for your team"

**CRITICAL GIT RULES:**

Expand Down