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