Skip to content

Commit 9531ec1

Browse files
authored
Set title and description written in line-openapi PR again (#741)
same as line/line-bot-sdk-nodejs#1123
1 parent 72bdbfd commit 9531ec1

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/generated-code.yml

+13-11
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,7 @@ jobs:
3939
## Run if diff exists and event is not pull request, and make PR
4040
- if: ${{ github.event_name != 'pull_request' && env.DIFF_IS_EMPTY != 'true' }}
4141
run: |
42-
BRANCH_NAME="update-diff-${{ env.CURRENT_DATETIME }}"
43-
44-
git config user.name github-actions
45-
git config user.email [email protected]
46-
git checkout -b $BRANCH_NAME
47-
48-
git add .
49-
git commit -m "Code are generated by openapi generator"
50-
51-
git push origin $BRANCH_NAME
52-
42+
# Determine Change Type via Submodule Script. This scripts read current uncommited changes.
5343
CHANGE_TYPE=$(npx zx ./line-openapi/tools/determine-change-type.mjs)
5444
echo "Determined change type: $CHANGE_TYPE"
5545
@@ -66,6 +56,18 @@ jobs:
6656
BODY="⚠Reviewer: Please edit this description to include relevant information about the changes.⚠"
6757
fi
6858
59+
# Create PR
60+
BRANCH_NAME="update-diff-${{ env.CURRENT_DATETIME }}"
61+
62+
git config user.name github-actions
63+
git config user.email [email protected]
64+
git checkout -b $BRANCH_NAME
65+
66+
git add .
67+
git commit -m "Code are generated by openapi generator"
68+
69+
git push origin $BRANCH_NAME
70+
6971
gh pr create -B ${{ github.ref_name }} -H $BRANCH_NAME -t "$TITLE" -b "$BODY" --label "line-openapi-update"
7072
env:
7173
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)