Skip to content

Commit

Permalink
Set title and description written in line-openapi PR again (#1523)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang-33 authored Jan 15, 2025
1 parent fe9da5c commit aac1f21
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/generate-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,9 @@ jobs:
## Run if diff exists and event is not pull request, and make PR
- if: ${{ github.event_name != 'pull_request' && env.DIFF_IS_EMPTY != 'true' }}
run: |
BRANCH_NAME="update-diff-${{ env.CURRENT_DATETIME }}"
git config user.name github-actions
git config user.email [email protected]
git checkout -b $BRANCH_NAME
git add .
git commit -m "Code are generated by openapi generator"
git push origin $BRANCH_NAME
# Determine Change Type via Submodule Script. This scripts read current uncommited changes.
CHANGE_TYPE=$(npx zx ./line-openapi/tools/determine-change-type.mjs)
echo "Determined change type: $CHANGE_TYPE"
# Determine PR title and body
if [ "$CHANGE_TYPE" == "submodule-update" ]; then
Expand All @@ -66,6 +59,18 @@ jobs:
BODY="⚠Reviewer: Please edit this description to include relevant information about the changes.⚠"
fi
# Create PR
BRANCH_NAME="update-diff-${{ env.CURRENT_DATETIME }}"
git config user.name github-actions
git config user.email [email protected]
git checkout -b $BRANCH_NAME
git add .
git commit -m "Code are generated by openapi generator"
git push origin $BRANCH_NAME
gh pr create -B ${{ github.ref_name }} -H $BRANCH_NAME -t "$TITLE" -b "$BODY" --label "line-openapi-update"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit aac1f21

Please sign in to comment.