|
|
@ -5,12 +5,6 @@ on:
|
|
|
|
# types:
|
|
|
|
# types:
|
|
|
|
# - closed
|
|
|
|
# - closed
|
|
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
|
|
|
GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
ISSUE: ${{ github.event.issue.html_url }}
|
|
|
|
|
|
|
|
OWNER: ${{ github.repository_owner }}
|
|
|
|
|
|
|
|
REPO: ${{ github.event.repository.name }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
create-pr:
|
|
|
|
create-pr:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
@ -29,14 +23,14 @@ jobs:
|
|
|
|
sudo apt-get install gh
|
|
|
|
sudo apt-get install gh
|
|
|
|
continue-on-error: true
|
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
|
|
|
|
- name: Configure GitHub CLI
|
|
|
|
# - name: Configure GitHub CLI
|
|
|
|
run: |
|
|
|
|
# run: |
|
|
|
|
git config --global user.email "3293172751ysy@gmail.com"
|
|
|
|
# git config --global user.email "3293172751ysy@gmail.com"
|
|
|
|
git config --global user.name "kubbot"
|
|
|
|
# git config --global user.name "kubbot"
|
|
|
|
echo "${{ secrets.BOT_GITHUB_TOKEN }}" | gh auth login --with-token
|
|
|
|
# echo "${{ secrets.BOT_GITHUB_TOKEN }}" | gh auth login --with-token
|
|
|
|
- name: Create PR to release branch
|
|
|
|
- name: Create PR to release branch
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
ISSUEID=$(gh pr view 642 --repo $OWNER/$REPO | grep -oP 'Fixes #\K\d+')
|
|
|
|
ISSUEID=$(gh pr view ${{ github.event.pull_request.number }} --repo $OWNER/$REPO | grep -oP 'Fixes #\K\d+')
|
|
|
|
echo "===========> $ISSUEID"
|
|
|
|
echo "===========> $ISSUEID"
|
|
|
|
ISSUE=$(gh issue view $ISSUEID --repo $OWNER/$REPO --json labels,assignees,milestone,title)
|
|
|
|
ISSUE=$(gh issue view $ISSUEID --repo $OWNER/$REPO --json labels,assignees,milestone,title)
|
|
|
|
echo "===========> $ISSUE"
|
|
|
|
echo "===========> $ISSUE"
|
|
|
@ -46,12 +40,17 @@ jobs:
|
|
|
|
MILESTONE=$(echo $ISSUE | jq -r '.milestone | select(.title) | .title')
|
|
|
|
MILESTONE=$(echo $ISSUE | jq -r '.milestone | select(.title) | .title')
|
|
|
|
TITLE=$(echo $ISSUE | jq -r '.title')
|
|
|
|
TITLE=$(echo $ISSUE | jq -r '.title')
|
|
|
|
|
|
|
|
|
|
|
|
echo $ISSUE | jq
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gh pr edit ${{ github.event.pull_request.number }} --repo $OWNER/$REPO --add-label "$LABELS" --add-assignee "$ASSIGNEES" --milestone "$MILESTONE"
|
|
|
|
gh pr edit ${{ github.event.pull_request.number }} --repo $OWNER/$REPO --add-label "$LABELS" --add-assignee "$ASSIGNEES" --milestone "$MILESTONE"
|
|
|
|
|
|
|
|
|
|
|
|
git checkout -b bot/merge-to-release-$ISSUEID
|
|
|
|
git checkout -b bot/merge-to-release-$ISSUEID
|
|
|
|
git push origin bot/merge-to-release-$ISSUEID
|
|
|
|
git push origin bot/merge-to-release-$ISSUEID
|
|
|
|
gh pr create --base release --head bot/merge-to-release-$ISSUEID --title "Merge main to release" --body ""
|
|
|
|
gh pr create --base release --head bot/merge-to-release-$ISSUEID --title "Merge main to release" --body ""
|
|
|
|
|
|
|
|
|
|
|
|
# gh pr create --base main --head feat/auto-release-pr-624 --title "The bug is fixed" --body "$x" --repo OpenIMSDK/Open-IM-Server --reviewer "cubxxw"
|
|
|
|
# gh pr create --base main --head feat/auto-release-pr-624 --title "The bug is fixed" --body "$x" --repo OpenIMSDK/Open-IM-Server --reviewer "cubxxw"
|
|
|
|
|
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
|
|
|
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
|
|
|
|
ISSUE: ${{ github.event.issue.html_url }}
|
|
|
|
|
|
|
|
OWNER: ${{ github.repository_owner }}
|
|
|
|
|
|
|
|
REPO: ${{ github.event.repository.name }}
|