Skip to content

uplift(beta): fix imap prefix handling #16

uplift(beta): fix imap prefix handling

uplift(beta): fix imap prefix handling #16

Workflow file for this run

---
name: PR Opened Actions
# Warning, this job is running on pull_request_target and therefore has access to issue content.
# Don't add any steps that act on external code.
on:
pull_request_target:
branches: [beta, release]
types: [opened]
permissions:
pull-requests: write
jobs:
pull-request-opened:
runs-on: ubuntu-latest
environment: botmobile
steps:
- name: App token generate
uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
if: ${{ vars.BOT_CLIENT_ID }}
id: app-token
with:
app-id: ${{ vars.BOT_CLIENT_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Uplift Approval Request
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
MILESTONE: ${{ steps.milestone.outputs.title }}
MESSAGE: |
Thank you for your uplift request! Please add a comment with the following approval request template filled out.
**[Approval Request]**
Original Issue/Pull request:
Regression caused by (issue #):
User impact if declined:
Testing completed (on daily, etc.):
Risk to taking this patch (and alternatives if risky):
run: |
if gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --json comments \
--jq '.comments[].body' | grep -q '\[Approval Request\]'; then
echo "Approval Request already exists. Skipping comment."
exit 0
fi
gh pr comment "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --body "$MESSAGE"