Skip to content

Commit f3c3783

Browse files
authored
Set title and description written in line-openapi PR again (#1123)
originally, line/line-openapi#74 expected to call scripts after calling generate-code.py. However, #1074 calls the scripts after some processes. This results unexpected behavior.... I hope this change fixes it.
1 parent 0a3a65d commit f3c3783

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

.github/workflows/update-code.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,7 @@ jobs:
5050
## Run if diff exists and event is not pull request, and make PR
5151
- if: ${{ github.event_name != 'pull_request' && env.DIFF_IS_EMPTY != 'true' }}
5252
run: |
53-
BRANCH_NAME="update-diff-${{ env.CURRENT_DATETIME }}"
54-
55-
git config user.name github-actions
56-
git config user.email github-actions@github.com
57-
git checkout -b $BRANCH_NAME
58-
59-
git add line-openapi
60-
git add lib/**
61-
git commit -m "Codes are generated by openapi"
62-
63-
git push origin $BRANCH_NAME
64-
65-
# Determine Change Type via Submodule Script
53+
# Determine Change Type via Submodule Script. This scripts read current uncommited changes.
6654
CHANGE_TYPE=$(npx zx ./line-openapi/tools/determine-change-type.mjs)
6755
echo "Determined change type: $CHANGE_TYPE"
6856
@@ -79,6 +67,19 @@ jobs:
7967
BODY="⚠Reviewer: Please edit this description to include relevant information about the changes.⚠"
8068
fi
8169
70+
# Create PR
71+
BRANCH_NAME="update-diff-${{ env.CURRENT_DATETIME }}"
72+
73+
git config user.name github-actions
74+
git config user.email github-actions@github.com
75+
git checkout -b $BRANCH_NAME
76+
77+
git add line-openapi
78+
git add lib/**
79+
git commit -m "Codes are generated by openapi"
80+
81+
git push origin $BRANCH_NAME
82+
8283
gh pr create -B ${{ github.ref_name }} -H $BRANCH_NAME -t "$TITLE" -b "$BODY" --label "line-openapi-update"
8384
env:
8485
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)