MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / get_git_user_name

Function get_git_user_name

tools/ci/bsp_detail.py:174–182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172current_year = datetime.today().year
173
174def get_git_user_name():
175 try:
176 result = subprocess.run(['git', 'config', 'user.name'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
177 if result.returncode == 0:
178 return result.stdout.strip()
179 else:
180 return "Unknown Author"
181 except Exception as e:
182 return "Unknown Author"
183
184# 获取 Git 用户名
185author_name = get_git_user_name()

Callers 1

bsp_detail.pyFile · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected