Skip to content

Commit ea893ec

Browse files
committed
Print short commit hash
The length is limited to 7 symbols.
1 parent 273a57d commit ea893ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

entrypoint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from github3.exceptions import NotFoundError, AuthenticationFailed
1010

1111
ENCODING = 'utf-8'
12+
SHORT_SHA_LEN = 7
1213

1314

1415
def get_input(key):
@@ -93,7 +94,7 @@ def main():
9394
print(f'Removed {file_path}')
9495

9596
if pushed_change:
96-
commit_sha = pushed_change['commit'].sha
97+
commit_sha = pushed_change['commit'][:SHORT_SHA_LEN]
9798
print(f'Pushed {commit_sha} to {branch}')
9899
else:
99100
print('No changes to push')

0 commit comments

Comments
 (0)