Added Petri Consensus #242
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Serena Merge Warning | |
| on: | |
| pull_request: | |
| branches: ["**"] | |
| jobs: | |
| serena-warning: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check for .serena changes | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Warn about .serena files | |
| run: | | |
| # Check if PR touches .serena files | |
| if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^\.serena/"; then | |
| echo "⚠️ This PR modifies .serena/ files" | |
| echo "🤖 After merge, these will be auto-reverted to preserve branch-specific memories" | |
| echo "" | |
| echo "Files affected:" | |
| git diff --name-only origin/${{ github.base_ref }}...HEAD | grep "^\.serena/" | sed 's/^/ - /' | |
| # Post comment on PR | |
| gh pr comment ${{ github.event.number }} --body "⚠️ **MCP Memory Files Detected** | |
| This PR modifies \`.serena/\` files. After merge, these changes will be **automatically reverted** to preserve branch-specific MCP memories. | |
| Files that will be reverted: | |
| $(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep '^\.serena/' | sed 's/^/- /')" || echo "Could not post comment" | |
| else | |
| echo "✅ No .serena files affected" | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |