Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add specific pr and branch templates for slack #125

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add specific pr and branch templates for slack #125

wants to merge 2 commits into from

Conversation

sahilda
Copy link

@sahilda sahilda commented Mar 6, 2018

if pull_request?
PULL_REQUEST_MESSAGE_TEMPLATE
def notification_template
if template_from_config(:template)

This comment was marked as spam.

Copy link
Contributor

@BanzaiMan BanzaiMan Apr 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The precedence of the various templates seems a little strange. I would expect the preference of more specific ones (pull_request_template and branch_build_template) to the general one (template), but the current logic is the reverse.

Furthermore, while I neglected this PR, we added a couple of new event types (cron, api) that are on par with push and PR. It stands to reason that we support templates for these, too.

@joshk
Copy link
Contributor

joshk commented Feb 5, 2019

Hi @sahilda

Sorry for the long wait for any reply from us.

This looks pretty interesting.

@BanzaiMan could you give this a code review?

@joshk joshk requested a review from BanzaiMan February 5, 2019 15:20
BanzaiMan added a commit that referenced this pull request Apr 3, 2019
Add specific pr and branch templates for slack
else
BRANCH_BUILD_MESSAGE_TEMPLATE
Array(template_from_config(:branch_template) || BRANCH_BUILD_MESSAGE_TEMPLATE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

branch_template seems to betray the meaning of the configuration. Perhaps branch_build_template.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call - variable updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants