Skip to content

Adds Discord Notifications#71

Closed
night wants to merge 2 commits intotravis-ci:masterfrom
night:master
Closed

Adds Discord Notifications#71
night wants to merge 2 commits intotravis-ci:masterfrom
night:master

Conversation

@night
Copy link

@night night commented Oct 10, 2016

This pull request adds the ability to send build status updates to Discord via webhooks.

The configuration format looks like the following:

notifications:
  discord:
    channels:
      - [webhook_id]:[webhook_token]
      - [webhook_id_2]:[webhook_token_2]
    pull_request_template:
      - 'Build [#%{build_number}](%{build_url}) ([%{commit}](%{compare_url})) of %{repository}@%{branch} in PR [#%{pull_request_number}](%{pull_request_url}) by %{author} %{result} in %{duration}'
    branch_template:
      - 'Build [#%{build_number}](%{build_url}) ([%{commit}](%{compare_url})) of %{repository}@%{branch} by %{author} %{result} in %{duration}'

Related PRs:
travis-ci/travis-core#562
travis-ci/travis-hub#84
travis-ci/docs-travis-ci-com#1133

@BanzaiMan
Copy link
Contributor

Thanks for opening this PR. We'll get back to you soon.

@night
Copy link
Author

night commented Nov 6, 2016

any updates? soon might have been a misnomer, lol.

@Xstoudi
Copy link

Xstoudi commented Nov 18, 2016

Usefull PR ! 👍

@james7132
Copy link

Waiting warmly for this PR to be merged.

@night
Copy link
Author

night commented Nov 23, 2016

@BanzaiMan any feedback or updates?

@shirbr510
Copy link

shirbr510 commented Jan 3, 2017

Useful PR! +1 to @night !

@TobiTenno
Copy link

+1

@TobiTenno
Copy link

@BanzaiMan sorry for the ping, but any updates? it's been a while and this would be amazing to get working.

@night
Copy link
Author

night commented Jan 31, 2017

I doubt we'll ever get a reply to this, but I think they've already made up their minds and have settled on a "no" to this integration, but are too afraid to say it. I mainly did this for hacktoberfest swag anyways, so it doesn't really irk me. But it woulda been kinda cool to see this be integrated. ¯\_(ツ)_/¯

@TobiTenno
Copy link

have you seen any workarounds with existing integrations like their slack integration to force it to send to a webhook with slack structure? since they have similar structure, it's what i've done on sentry for some projects.

@durandj
Copy link

durandj commented Jan 31, 2017

@night, would love to see this added! Maybe they haven't merged it because of a build failure here: travis-ci/travis-core#562

@TobiTenno
Copy link

The failure there is a dependency version issue, the dependency requires 2.1, bit it's trying to run against 2.0, @night. is that the only version of net-http-persistent that works?

@night
Copy link
Author

night commented Feb 17, 2017

@aliasfalse that test failing is not my fault nor my responsibility to fix, and there's already an open PR to fix the build, but it's unmerged as of November of last year.. the failing test is not a valid reason why this is not yet merged either.

@BanzaiMan
Copy link
Contributor

Tasks should be core-less at this point.

BanzaiMan added a commit that referenced this pull request Feb 20, 2017
Adds Discord Notifications
@BanzaiMan
Copy link
Contributor

Tested in staging (with my added logging and conflict resolution):

2017-02-20T02:53:02.282202+00:00 app[tasks.1]: I queue=discord notifier=discord build=542711 repo=BanzaiMan/travis_staging_test  time=0.001 jid=d2ecd4560a4c61671350ed84 event=push

If you want to test this now, please set up a repository on https://staging.travis-ci.org (go to https://staging/travis-ci.org/profile/USER; sync and enable a repo; push a commit to the repo).

@BanzaiMan
Copy link
Contributor

Also, please open a documentation PR for https://github.com/travis-ci/docs-travis-ci-com.

@StarSmasher44
Copy link

Will be implemented when? @night @BanzaiMan Since this seems like a great feature.

@Stanzilla
Copy link

Yup, this would be awesome to have!

@DarthMDev
Copy link

+1

@BanzaiMan
Copy link
Contributor

Hello. Sorry about the delay in responding. After some further internal discussion, we have put this PR on hold.

@Techtony96
Copy link

I figured I would add this here, I emailed support wondering if there was a way to send a slack webhook to a custom URL, rather than putting in the slack code and token, and this was the response I got (about 10 minutes before the reply above, from the same representative)

Hi, Tony,

Thanks for the email.

At the moment, it is not possible to pass URL to the Slack notifier, as the endpoint is hardcoded.

We have an outstanding PR #71 that implements support for Discord. As indicated there, however, we have unfortunately decided to put it on hold. You are welcome to subscribe to the PR for any future updates, though.

It might be possible to write a small service that takes our webhook payload and POSTs data to the discord endpoint after appropriate transformation.

Thank you.

@Techtony96
Copy link

Figured I would post this here as I took BanzaiMan's suggestion and made a small php script that forwards a travis-ci webhook on to discord. It looks like:

The repo is here: https://github.com/Techtony96/TravisCI-Webhooks/

@night
Copy link
Author

night commented Apr 29, 2017

I have created a PR for documentation at travis-ci/docs-travis-ci-com#1133, which should unblock this should I be a blocker.

@OwlManAtt
Copy link

Is there something we can do to unblock this, @BanzaiMan?

I too have a shim in place to transform your webhook format into my desired discord message, but that rather defeats the purpose of having all my CI infrastructure in the cloud :)

@Brodan
Copy link

Brodan commented Oct 6, 2017

@BanzaiMan any updates? I'm practically done with a PR to implement native Twilio support but I'm worried it's going to go untouched indefinitely.

joaodelgado added a commit to joaodelgado/rustyboy that referenced this pull request Oct 15, 2017
It doesn't work :(

See travis-ci/travis-tasks#71 for a potential future integration
@msgerbs
Copy link

msgerbs commented Oct 22, 2017

I really don't understand why this has not been acted on or even meaningfully responded to in over a year.

@Jarvvski
Copy link

@msgerbs I too would like to know.

For now, I use the script written by @Techtony96 here

@Erlite
Copy link

Erlite commented Nov 8, 2017

Tbh it'd be awesome to have Discord support.

@Erlite
Copy link

Erlite commented Nov 9, 2017

For those of you that don't have a webserver for the php solution, I made a couple of scripts that run on the build server: https://github.com/Erlite/travis-ci-discord-webhooks

@TobiTenno
Copy link

So, why is it on hold? I don't think y'all are gaining anything and are in fact losing respect when you leave things like this open for several months with no reason why they're held back.

@Jarvvski
Copy link

@BanzaiMan Are we going to get any updates here? It would be helpful for the whole community if you shared your reasons for why this isn't being merged. That way, we can resolve that and move on

@iamtraction
Copy link

iamtraction commented Nov 17, 2017

It's been more than a year, any updates yet?
In the meanwhile, for those who are still looking for a workaround, here's a simple guide to get Travis CI build status notifications via webhooks in Discord: https://github.com/k3rn31p4nic/travis-ci-discord-webhook
And you don't need any server for this.

Thanks @Erlite for the heads up.

@Arzte
Copy link

Arzte commented Nov 17, 2017

Asking for updates on a frequent basis is annoying and unhelpful, give the kind people at Travis some time to reply to the request for updates, a couple of days is not enough time for a response

@TobiTenno
Copy link

TobiTenno commented Nov 17, 2017

The submission date was October 2016, not 2017.

@Arzte
Copy link

Arzte commented Nov 17, 2017

Yes, but many have already @ mentioned or otherwise the people at travis already, any further attention seeking is annoying and uneeded.

@cryptiklemur
Copy link

Just trying to get answers @Coding-Doctors . Not really unneeded. Going over a year without an actual reason to why this hasn't been merged or even discussed is "annoying and unneeded".

After all, the squeeky wheel gets the grease.

@Arzte
Copy link

Arzte commented Nov 18, 2017

I was and have been referring to the past few days, not the entirety of the year+ this has been open.

Copy link

@Celant Celant left a comment

Choose a reason for hiding this comment

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

Who knows, perhaps this will finally be merged, or at least a reason provided as to why not.

Copy link

@AxisKriel AxisKriel left a comment

Choose a reason for hiding this comment

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

👍

Copy link

@Jarvvski Jarvvski left a comment

Choose a reason for hiding this comment

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

LGTM

@travis-ci travis-ci locked and limited conversation to collaborators Dec 19, 2017
@night night closed this May 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.