File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change 42
42
# # Run if diff exists and event is not pull request, and make PR
43
43
- if : ${{ github.event_name != 'pull_request' && env.DIFF_IS_EMPTY != 'true' }}
44
44
run : |
45
- BRANCH_NAME="update-diff-${{ env.CURRENT_DATETIME }}"
46
-
47
- git config user.name github-actions
48
- git config user.email github-actions@github.com
49
- git checkout -b $BRANCH_NAME
50
-
51
- git add .
52
- git commit -m "Code are generated by openapi generator"
53
-
54
- git push origin $BRANCH_NAME
45
+ # Determine Change Type via Submodule Script. This scripts read current uncommited changes.
46
+ CHANGE_TYPE=$(npx zx ./line-openapi/tools/determine-change-type.mjs)
47
+ echo "Determined change type: $CHANGE_TYPE"
55
48
56
49
# Determine PR title and body
57
50
if [ "$CHANGE_TYPE" == "submodule-update" ]; then
66
59
BODY="⚠Reviewer: Please edit this description to include relevant information about the changes.⚠"
67
60
fi
68
61
62
+ # Create PR
63
+ BRANCH_NAME="update-diff-${{ env.CURRENT_DATETIME }}"
64
+
65
+ git config user.name github-actions
66
+ git config user.email github-actions@github.com
67
+ git checkout -b $BRANCH_NAME
68
+
69
+ git add .
70
+ git commit -m "Code are generated by openapi generator"
71
+
72
+ git push origin $BRANCH_NAME
73
+
69
74
gh pr create -B ${{ github.ref_name }} -H $BRANCH_NAME -t "$TITLE" -b "$BODY" --label "line-openapi-update"
70
75
env :
71
76
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments