Skip to content

Commit

Permalink
Increase issue title length
Browse files Browse the repository at this point in the history
Closes #21
  • Loading branch information
alstr committed Sep 25, 2020
1 parent 3ab9a52 commit 50ac4cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Create a workflow file in your .github/workflows directory as follows:

### workflow.yaml

Latest version is `v2.0`.
Latest version is `v2.1`.

name: "Workflow"
on: ["push"]
Expand Down Expand Up @@ -75,7 +75,7 @@ This will create an issue called "Come up with a more imaginative greeting".

**The action expects a colon and/or space to follow the `TODO` label (so `TODO: ` or just `TODO`).**

Should the title be longer than 50 characters, it will be truncated for the issue title.
Should the title be longer than 80 characters, it will be truncated for the issue title.

The full title will be included in the issue body and a `todo` label will be attached to the issue.

Expand Down
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ def process_line(next_line):
print('Start creating issues')
for i, issue in enumerate(new_issues):
title = issue['todo']
# Truncate the title if it's longer than 50 chars.
if len(title) > 50:
title = title[:50] + '...'
# Truncate the title if it's longer than 80 chars.
if len(title) > 80:
title = title[:80] + '...'
file = issue['file']
line = issue['line_num']
body = issue['body'] + '\n\n' + f'https://github.com/{repo}/blob/{sha}/{file}#L{line}'
Expand Down

0 comments on commit 50ac4cb

Please sign in to comment.