Giter VIP home page Giter VIP logo

tc-discord-webhooks's Introduction

Hi Pascal Zarrad here ๐Ÿ‘‹

I'm a fullstack web developer at flagbit.

  • ๐Ÿ”ญ Iโ€™m working on some personal projects like Pascal's Shell or GCaptchaValidator
  • ๐ŸŒฑ I'm also working on some projects together with a friend which you can find on Lazy Bytez
  • ๐Ÿ‘ฏ Iโ€™m an open source contributor that is looking forward to empower free and open software
  • ๐Ÿ“š Iโ€™m always learning and love to improve my work
  • ๐Ÿ“ซ You can reach me using the following mail: [email protected]

Java Go JavaScript Java JavaScript GitHub


pascal-zarrad's Github Stats pascal-zarrad's Top Languages

tc-discord-webhooks's People

Contributors

frnandu avatar licho1 avatar looterz avatar pascal-zarrad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tc-discord-webhooks's Issues

Make notifications customizeable

Is your feature request related to a problem? Please describe.
Currently the messages for the webhooks are hardcoded and cannot be adjusted. This is bad and should be changed.

Describe the solution you'd like
Implement the functionality to customize the send webhooks.
This implementation can either be done via TeamCity's default way of customizing notifications or by a custom webhook editor in the administration area.

include changes in notification (commit log)

Is your feature request related to a problem? Please describe.
Would be nice to have info on what changes the build includes

Describe the solution you'd like
shoudl be possible to get the list of changes (commit msg log) and include it on the notification

Not working

Problem: Look's like no messages are sent

TeamCity Version: 2019.2.1 (build 71758)
Settings as displayed at the screenshot.

Screenshot from 2020-02-07 10-57-04

A build triggered by the Finish Build Trigger doesn't trigger a notification

Describe the bug
A build triggered by the Finish Build Trigger doesn't trigger a notification. The original build that finished that was the trigger does make a notification though.

To Reproduce
Steps to reproduce the behavior:

  1. Create a build config, let's call it build A. This build config is triggered by a VCS Trigger with branches specified that triggers it (ensure the branches are also in the Discord notify branch filter), e.g. +:refs/heads/release/QA
  2. Create a build config, let's call it build B, that has a Finish Build Trigger on build A. This build gets the same VCS information from build A.
  3. Create a change in the branch from step 1 and push it to trigger a new build

Expected behavior
Get a notification for build A and build B's start and stop events. Currently we only get notifications for build A and not B. Both A and B is the list of build configs that we want notifications for

Screenshots
Build A trigger config
Screenshot 2021-07-15 at 11 43 34

Build B trigger config
Screenshot 2021-07-15 at 11 48 12

Discord notification config
Screenshot 2021-07-15 at 11 48 40

Additional context
None

Bring guidelines up to date

Is your feature request related to a problem? Please describe.
The repo currently does use many of the great new features that GitHub introduced. We should change that.

Describe the solution you'd like
The following things should be changed:

  • Add a code of conduct
  • Add a social image
  • Add contribution guidelines
  • Add issue templates
  • Add a PR template
  • Enable GitHubs security features
  • Switch from Travis to GitHub Actions

Change labels and update workflows

Is your feature request related to a problem? Please describe.
Currently the labels are unsorted, that should be changed.

Describe the solution you'd like
Change the GitHub issue labels to sort them and update the stale workflow to support the renamed labels.
We can apply numeric prefixes with some letter that descriptes the scope of a label (for example: C1 = Category 1)

Branch always showing default, even when running on non default branch

Describe the bug
In the message, the Branch always shows "Default", even if the build is on another branch than master

To Reproduce
Enable notifications
Launch a build
Read the notification on discord

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
configuration
image
notification
image

Environment:

  • OS: Linux
  • Dist: Docker
  • Shell: Bash

Additional context
I use three build features
Performance Monitor
SSH agent
Report change status to GitHub

Also, when I click on the link, it gives me the correct build report, and in the report parameters, I see the correct branch name in teamcity.build.branch
and teamcity.build.branch.is_default is marked as false.

How to configure proxy

I'm trying to use it on a server that needs proxy.
I've tried setting TEAMCITY_SERVER_OPTS with -Dhttp.proxyHost=.... -Dhttp.proxyPort=... -Dhttps.proxyHost=.... -Dhttps.proxyPort=.... -Dhttp.nonProxyHosts=....
and restarting teamcity, then even uninstall and install the plugin again.

Also tried to add

teamcity.http.nonProxyHosts=...
teamcity.https.proxyHost=...
teamcity.https.nonProxyHosts=...
teamcity.http.proxyHost=...
teamcity.https.proxyPort=...
teamcity.http.proxyPort=...

on internal.properties

but everytime I get this:

[2021-02-13 23:42:24,271] ERROR [9@58f69f86'; Normal executor 1] - notificator.DiscordNotificator - Failed to send the WebHook! org.apache.http.conn.HttpHostConnectException: Connect to discord.com:443 [discord.com/162.159.136.232, discord.com/162.159.135.232, discord.com/162.159.128.233, discord.com/162.159.137.232, discord.com/162.159.138.232] failed: Connection timed out (Connection timed out) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:374) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) at com.github.playerforcehd.tcdiscordwebhooks.discord.DiscordWebHookProcessor.sendDiscordWebHook(DiscordWebHookProcessor.java:95) at com.github.playerforcehd.tcdiscordwebhooks.discord.DiscordWebHookProcessor.sendDiscordWebHook(DiscordWebHookProcessor.java:73) at com.github.playerforcehd.tcdiscordwebhooks.notificator.DiscordNotificator.processNotify(DiscordNotificator.java:145) at com.github.playerforcehd.tcdiscordwebhooks.notificator.DiscordNotificator.notifyBuildFailed(DiscordNotificator.java:258) at jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener$NotificatorEventAdapter.notifyBuildFailureWatchers(UserRulesAwareNotificationListener.java:237) at jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener$NotificatorEventAdapter.buildFailedSubsequent(UserRulesAwareNotificationListener.java:192) at jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener$NotificatorEventAdapter.access$400(UserRulesAwareNotificationListener.java:148) at jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener.buildFailed(UserRulesAwareNotificationListener.java:23) at jetbrains.buildServer.notification.NotificationProcessor$5.call(NotificationProcessor.java:3) at jetbrains.buildServer.notification.NotificationProcessor$19.run(NotificationProcessor.java:8) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.net.ConnectException: Connection timed out (Connection timed out) at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) at java.base/java.net.Socket.connect(Socket.java:609) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:368) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) ... 22 more

Missing settings in Notification Rules

Describe the bug
A clear and concise description of what the bug is.

When attempting to assign a hook in Notification Rules -> Discord WebHook, no settings box appears to be able to assign the hook or username. You can see the normal "watching" rules box, but no settings for this tool.

To Reproduce
Steps to reproduce the behavior:

  1. Install Webhook Plugin
  2. Restart Server
  3. Go to Groups -> Notification Rules -> Discord WebHook
  4. Notice the settings box is missing

Expected behavior
Should have settings box for hook url and username visible and able to be edited

Screenshots
image

Environment:

  • OS: Windows 10

Check the project and bring it up to date if necessary

Is your feature request related to a problem? Please describe.
Check if here is stuff that needs to be updated and prepare the project for further development.
This includes adjustments to the development environment.

Describe the solution you'd like

  • Check documentation and ensure it is up to date.
  • Update local development environment
  • Update targeted TeamCity version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.