File tree Expand file tree Collapse file tree 1 file changed +22
-9
lines changed
Expand file tree Collapse file tree 1 file changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,6 @@ name: Update UE Submodule and PR
33on :
44 workflow_dispatch :
55
6- env :
7- COMMITS_BODY : ' '
8-
96jobs :
107 update-submodule :
118 permissions : write-all
@@ -30,12 +27,28 @@ jobs:
3027 run : |
3128 cd ./deps/first/Unreal
3229 git fetch origin main
33- git log HEAD..main --pretty="tformat:* %s (**%an**) _%h_" >> submodule-commits.txt
34- body=$(cat submodule-commits.txt)
35- body="${body//'%'/'%25'}"
36- body="${body//$'\n'/'%0A'}"
37- body="${body//$'\r'/'%0D'}"
38- echo "COMMITS_BODY=$body" >> $GITHUB_ENV
30+
31+ # Get the remote URL to extract owner/repo
32+ REMOTE_URL=$(git config --get remote.origin.url)
33+ # Extract owner/repo from the URL (works for both HTTPS and SSH)
34+ if [[ $REMOTE_URL == [email protected] :* ]]; then 35+ REPO_PATH=${REMOTE_URL#[email protected] :} 36+ REPO_PATH=${REPO_PATH%.git}
37+ else
38+ REPO_PATH=${REMOTE_URL#https://github.com/}
39+ REPO_PATH=${REPO_PATH%.git}
40+ fi
41+
42+ # Generate commit list with proper PR links
43+ git log HEAD..main --pretty="tformat:* %s (**%an**) _%h_" | \
44+ sed "s/#\([0-9]\+\)/[#\1](https:\/\/github.com\/${REPO_PATH}\/pull\/\1)/g" > submodule-commits.txt
45+
46+ # Read the file content and save to environment variable
47+ {
48+ echo 'COMMITS_BODY<<EOF'
49+ cat submodule-commits.txt
50+ echo EOF
51+ } >> $GITHUB_ENV
3952
4053 - name : Update submodule to latest commit on main branch
4154 run : |
You can’t perform that action at this time.
0 commit comments