Skip to content
This repository was archived by the owner on Dec 27, 2025. It is now read-only.

Conversation

@williamwmarx
Copy link
Owner

Summary

  • Markdown workflow now creates a PR instead of pushing directly to main
  • Enables auto-merge with squash so updates still happen automatically
  • Respects branch protection rules requiring PRs

Test plan

  • Merge this PR
  • Make a change that triggers markdown regeneration
  • Verify workflow creates a PR and auto-merges it

@greptile-apps
Copy link

greptile-apps bot commented Dec 26, 2025

Greptile Summary

Workflow now creates PRs with auto-merge instead of pushing directly to main, properly respecting branch protection rules.

  • Changed trigger from on: push to on: push: branches: main with paths-ignore for README.md and INSTALL.md to prevent workflow loops
  • Added pull-requests: write permission for PR creation
  • Creates timestamped branch (docs/markdown-update-{timestamp}) for each markdown update
  • Uses gh pr create with --base main and enables auto-merge with squash
  • Improved commit message format from "Markdown build {date}" to "docs: update generated markdown"

The paths-ignore effectively solves the workflow loop issue since assembly/main.go only generates README.md and INSTALL.md.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The implementation correctly addresses branch protection requirements by switching from direct push to PR workflow. The paths-ignore configuration properly prevents workflow loops since the only files generated (README.md and INSTALL.md) are explicitly excluded from triggering the workflow. The PR creation logic is sound with proper base branch specification and auto-merge configuration.
  • No files require special attention

Important Files Changed

Filename Overview
.github/workflows/markdown.yml Changed from direct push to PR-based workflow with auto-merge, added paths-ignore to prevent workflow loop, improved commit message format

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant GH as GitHub Main Branch
    participant WF as Workflow
    participant Bot as GitHub Actions Bot
    participant PR as Pull Request

    Dev->>GH: Push code changes to main
    Note over GH: Excludes README.md/INSTALL.md
    GH->>WF: Trigger markdown workflow
    WF->>WF: Checkout repository
    WF->>WF: Setup Go environment
    WF->>WF: Run go run assembly/main.go
    WF->>WF: Check git status for changes
    alt Changes detected
        WF->>Bot: Create branch docs/markdown-update-{timestamp}
        Bot->>Bot: Configure git user
        Bot->>Bot: Commit changes with "docs: update generated markdown"
        Bot->>GH: Push new branch
        Bot->>PR: Create PR with title & body
        Bot->>PR: Enable auto-merge with squash
        PR->>GH: Auto-merge to main (after checks pass)
        Note over GH: README.md/INSTALL.md updated
        Note over WF: Workflow ignores this push (paths-ignore)
    else No changes
        WF->>WF: Exit without action
    end
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 36 to 37
gh pr create --title "docs: update generated markdown" --body "Auto-generated markdown update" --head "$BRANCH"
gh pr merge --auto --squash
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider specifying the base branch explicitly using --base main to ensure the PR targets the correct branch

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/markdown.yml
Line: 36:37

Comment:
**style:** Consider specifying the base branch explicitly using `--base main` to ensure the PR targets the correct branch

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

Instead of pushing directly to main, the markdown workflow now creates
a PR and enables auto-merge. This respects branch protection rules while
still automating markdown updates.
@williamwmarx williamwmarx force-pushed the fix/markdown-workflow-pr branch from 33080b7 to 114c6a2 Compare December 26, 2025 23:43
@williamwmarx
Copy link
Owner Author

@greptileai review

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +3 to +6
on:
push:
branches:
- main
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: workflow will run twice per change: once on initial push to main, and again when the auto-merged PR pushes to main. consider adding a skip condition to prevent the second run when the commit author is "GitHub Actions Bot"

Suggested change
on:
push:
branches:
- main
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'INSTALL.md'

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/markdown.yml
Line: 3:6

Comment:
**style:** workflow will run twice per change: once on initial push to `main`, and again when the auto-merged PR pushes to `main`. consider adding a skip condition to prevent the second run when the commit author is "GitHub Actions Bot"

```suggestion
on:
  push:
    branches:
      - main
    paths-ignore:
      - 'README.md'
      - 'INSTALL.md'
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

Skip markdown build when only README.md/INSTALL.md change, preventing
the auto-merged PR from triggering another workflow run.
@williamwmarx
Copy link
Owner Author

@greptileai review

@williamwmarx williamwmarx merged commit 2919a3f into main Dec 27, 2025
1 check passed
@williamwmarx williamwmarx deleted the fix/markdown-workflow-pr branch December 27, 2025 00:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants