Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create compiler merge bot #122

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
37 changes: 37 additions & 0 deletions .github/workflows/compiler-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Compiler merge checklist

on:
pull_request_target:
types: [opened, synchronize, reopened]
paths:
- 'upstream/ocaml_flambda/base-rev.txt'

jobs:
remind:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Create PR Comment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
REPO=${{ github.repository }}
PR_NUMBER=${{ github.event.pull_request.number }}
COMMENT="## Compiler Merge Checklist

This PR seems to merge changes from Flambda. Please be sure to follow the below steps:

- [ ] Update the magic numbers
- [ ] Update list of compiler flags to ignore
- [ ] Make Merlin know about new relevant compiler flags

If this PR is not merging changes from Flambda, feel free to ignore this comment"

# Check if comment already exists
if ! gh pr view $PR_NUMBER --json comments -q '.comments[].body' --repo $REPO | grep -q "Compiler Merge Checklist"; then
gh pr comment $PR_NUMBER --body "$COMMENT" --repo $REPO
echo "Comment added successfully."
else
echo "Comment already exists. Skipping."
fi
Loading