diff --git a/GitHubClient.py b/GitHubClient.py index f1ccce4..7014f63 100644 --- a/GitHubClient.py +++ b/GitHubClient.py @@ -407,5 +407,4 @@ class GitHubClient(Client): return pr_request.status_code def get_issue_url(self, new_issue_number): - """Get the URL for the issue.""" - return f'{self.line_base_url}{self.target_repo}/issues/{new_issue_number}' + return f'{self.line_base_url}{self.repo}/issues/{new_issue_number}' diff --git a/README.md b/README.md index 11d80cc..5a95192 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,8 @@ Grant the following **Repository permissions**: - **Metadata**: Read (required) - **Pull requests**: Read (if using with PRs) +As per the [Google Style Guide](https://google.github.io/styleguide/cppguide.html#TODO_Comments), you can provide a _reference_ after the TODO identifier: + ### 3. Generate and Store Secrets 1. **Private Key**: Generate and download the private key @@ -647,7 +649,7 @@ run: ## Thanks -The action was originally developed for the GitHub Hackathon in 2020. Whilst every effort is made to ensure it works, +This action was originally developed by [Alastair Mooney](https://mnydigital.com/) for the GitHub Hackathon in 2020. Whilst every effort is made to ensure it works, it comes with no guarantee. Thanks to GitHub's [linguist repo](https://github.com/github/linguist/) for the [`languages.yml`](https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml) file used by the app to look up file extensions @@ -657,6 +659,6 @@ Thanks to all those who have [contributed](https://github.com/alstr/todo-to-issu ## Supporting the Project -If you've found this action helpful and it has made your workflow easier, please consider buying a coffee to help keep it going. Thank you in advance! +If you’ve found this action helpful and it has made your workflow easier, please consider buying a coffee to help keep it going. Thank you in advance! [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/alstr18858) diff --git a/TodoParser.py b/TodoParser.py index 1aa3be8..8161aec 100644 --- a/TodoParser.py +++ b/TodoParser.py @@ -363,11 +363,11 @@ class TodoParser(object): for i, issue in enumerate(issues): # Strip some of the diff symbols so it can be included as a code snippet in the issue body. # Strip removed lines. - cleaned_hunk = re.sub(r'\n^-.*$', '', issue.hunk, 0, re.MULTILINE) + cleaned_hunk = re.sub(r'\n^-.*$', '', issue.hunk, count=0, flags=re.MULTILINE) # Strip leading symbols/whitespace. - cleaned_hunk = re.sub(r'^.', '', cleaned_hunk, 0, re.MULTILINE) + cleaned_hunk = re.sub(r'^.', '', cleaned_hunk, count=0, flags=re.MULTILINE) # Strip newline message. - cleaned_hunk = re.sub(r'\n\sNo newline at end of file', '', cleaned_hunk, 0, re.MULTILINE) + cleaned_hunk = re.sub(r'\n\sNo newline at end of file', '', cleaned_hunk, count=0, flags=re.MULTILINE) issue.hunk = cleaned_hunk return issues diff --git a/action.yml b/action.yml index a127321..b31c4ba 100644 --- a/action.yml +++ b/action.yml @@ -52,7 +52,6 @@ runs: LANGUAGES: ${{ inputs.LANGUAGES }} NO_STANDARD: ${{ inputs.NO_STANDARD }} INSERT_ISSUE_URLS: ${{ inputs.INSERT_ISSUE_URLS }} - branding: icon: "check-square" color: "orange"