docs/changes/repo_url: handle PR refs
Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
This commit is contained in:
parent
eb25aa6b2b
commit
1b15ba70bb
|
@ -28,11 +28,17 @@ ROOT = Path(__file__).resolve().parent
|
|||
|
||||
def repo_url(repo, value):
|
||||
ref = value
|
||||
url = 'commit'
|
||||
parts = None
|
||||
if '@' in value:
|
||||
parts = value.split('@')
|
||||
if '#' in value:
|
||||
parts = value.split('#')
|
||||
if parts is not None:
|
||||
url = 'pull'
|
||||
repo = parts[0]
|
||||
ref = parts[1]
|
||||
return f'https://github.com/{repo}/commit/{ref}'
|
||||
return f'https://github.com/{repo}/{url}/{ref}'
|
||||
|
||||
|
||||
def generate_changes_inc():
|
||||
|
|
Loading…
Reference in New Issue