Merge pull request #2 from chrisdutz/feature/updated-default-subjects
Prepared the changes for changing the subject line defaults.
diff --git a/ghd-notifier.py b/ghd-notifier.py
index 7583bfb..505cff0 100644
--- a/ghd-notifier.py
+++ b/ghd-notifier.py
@@ -102,6 +102,9 @@
# Otherwise use the default one, which is located in the title of the template.
else:
subject = subject.format(**locals()).strip()
+ # Small "hack" to add a prefix of "Re: " to everything that's not creating a new discussion.
+ if action_name != "new_discussion"
+ subject = "Re: " + subject
except (KeyError, ValueError) as e: # Template breakage can happen, ignore
print(e)
return
diff --git a/templates/comment-action.txt b/templates/comment-action.txt
index 658c15c..ea6db5c 100644
--- a/templates/comment-action.txt
+++ b/templates/comment-action.txt
@@ -1,4 +1,4 @@
-[GitHub] [{repository}] {user} {action_human} {title}
+Re: [D] {title} [{repository}]
--
GitHub user {user} {action_human} {title}
diff --git a/templates/thread-action.txt b/templates/thread-action.txt
index aa95a6e..426b013 100644
--- a/templates/thread-action.txt
+++ b/templates/thread-action.txt
@@ -1,4 +1,4 @@
-[GitHub] [{repository}] {user} {action} a discussion: {title}
+[D] {title} [{repository}]
--
GitHub user {user} {action} a discussion: {title}