mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-22 22:06:43 +00:00
Fix URL to line
This commit is contained in:
parent
77d9a65a69
commit
7ad18c4076
@ -3,7 +3,7 @@ description: 'Converts IDE TODO comments to GitHub issues'
|
||||
author: 'Alastair Mooney'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'docker://ghcr.io/alstr/todo-to-issue-action:v4.11'
|
||||
image: 'docker://ghcr.io/alstr/todo-to-issue-action:v4.11.1'
|
||||
branding:
|
||||
icon: 'check-square'
|
||||
color: 'orange'
|
||||
|
||||
6
main.py
6
main.py
@ -116,7 +116,11 @@ class GitHubClient(object):
|
||||
# Title is too long.
|
||||
title = title[:80] + '...'
|
||||
formatted_issue_body = self.line_break.join(issue.body)
|
||||
url_to_line = f'{self.base_url}{self.repo}/blob/{self.sha}/{issue.file_name}#L{issue.start_line}'
|
||||
if self.base_url == 'https://api.github.com/':
|
||||
line_base_url = 'https://github.com/'
|
||||
else:
|
||||
line_base_url = self.base_url
|
||||
url_to_line = f'{line_base_url}{self.repo}/blob/{self.sha}/{issue.file_name}#L{issue.start_line}'
|
||||
snippet = '```' + issue.markdown_language + '\n' + issue.hunk + '\n' + '```'
|
||||
|
||||
issue_template = os.getenv('INPUT_ISSUE_TEMPLATE', None)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user