Skip to content

Commit

Permalink
ci: Post Integration Tests Trigger Comment on Base Branch Change (#9897)
Browse files Browse the repository at this point in the history
## Description
**Issue:** Integration tests were not triggered when base branch is changed from some-branch to master. Neither the PR author is aware that we have to re-trigger them.

**Solution:**
Wrote a github action which will subscribe "- edited" action and will be triggered on base branch change. As a result, a comment will be posted on PR notifying author to trigger integration tests.

**Why not do it programmatically? Other Solutions/Approaches**?
Such concerns are addressed in detail in following document:
https://docs.google.com/document/d/18cjQINkZ7Kc8eEGt0FrfuO78yShZAV32fnhfpG4A-9o/edit




### Security Considerations


### Scaling Considerations


### Documentation Considerations


### Testing Considerations


### Upgrade Considerations
  • Loading branch information
mergify[bot] authored Aug 28, 2024
2 parents 2c51185 + b815a6c commit daff9eb
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/comment-on-base-branch-change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Post Integration Test Comment on Base Branch Change

on:
pull_request:
types:
- edited

jobs:
trigger:
runs-on: ubuntu-latest
if: ${{ github.event.changes.base && github.event.pull_request.base.ref == 'master' }}
steps:
- name: Post a comment on the PR
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: "Base branch is changed to master. Please re-run the integration tests by adding 'force:integration' label."
})

0 comments on commit daff9eb

Please sign in to comment.