Skip to content

Commit 958d4b4

Browse files
authored
Update main_py_to_bitly.yml
1 parent df9a71d commit 958d4b4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/main_py_to_bitly.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
echo "No main.py exists"
2222
exit 1
2323
fi
24+
- name: Get first line of last commit message
25+
shell: bash
26+
run: |
27+
echo "one_line=$(git log --oneline -n 1 --format=%B | head -n 1)" >> $GITHUB_ENV
2428
- name: Decorate path_of_main_py
2529
shell: bash
2630
env:
@@ -37,6 +41,6 @@
3741
-H "Authorization: Bearer ${{ env.BITLY_PAT }}" \
3842
-H "Content-Type: application/json" \
3943
-X POST \
40-
-d '{"long_url": "${{ env.path_of_main_py }}"}' \
44+
-d '{"long_url": "${{ env.path_of_main_py }}", "title": "${{ env.one_line }}"}' \
4145
https://api-ssl.bitly.com/v4/bitlinks
4246

0 commit comments

Comments
 (0)