Skip to content
Closed
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
29 changes: 29 additions & 0 deletions .github/workflows/rebase-check
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Rebase Check

on:
pull_request:
types: [opened]
branches:
- staging
- draft

jobs:
rebase-check:
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Post '..' comparison link to verify changes are identical to normal comparison
uses: actions/github-script@v7
with:
script: |
const compareUrl = `https://github.com/OpenLiberty/openliberty.io/compare/${{ github.base_ref }}..${{ github.head_ref }}`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: 'openliberty.io',
issue_number: context.payload.pull_request.number,
body: `**Compare your changes here:** \n ${compareUrl} \n Ensure the changes are identical to the desired changes. If not, please resolve merge conflicts (if any) and rebase '${{ github.head_ref }}' onto '${{ github.base_ref }}'`
});