alstr/todo-to-issue-action

Issue body uses GitHub API base URL but should be regular GitHub

Clashsoft opened this issue · 2 comments

See for example here: fujaba/fulib.org#349. The link is neither rendered nicely, nor does it yield anything but an error when clicking.

The problem is here:

url_to_line = f'{self.base_url}{self.repo}/blob/{self.sha}/{issue.file_name}#L{issue.start_line}'

Instead of base_url (which is set to GITHUB_URL env, which defaults to github.api_url action variable), it should be just the GitHub URL. Maybe an additional option is required.

alstr commented

Thanks for that; it previously used the normal GitHub URL but base_url was changed in #150 and it seems to have inadvertently affected this. I'll aim to fix it shortly.

alstr commented

Should hopefully be fixed by 7ad18c4. I've just released a new version.