Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Integration webhook message

Discussion in 'Unity Version Control' started by Dimlos, Jun 1, 2023.

  1. Dimlos

    Dimlos

    Joined:
    Aug 13, 2014
    Posts:
    46
    Hello, I just followed the tutorial to have a discord channel recieve a message when somebody checks in succesfully.Our only problem is that it displays our personal e-mails.
    Is there a way to change what is displayed, so that it show our useranmes instead?
     
    Emelkah likes this.
  2. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    836
    Hi, I'm afraid it's not customizable. It should show the emails you are using for login. Your plasticscm.com or UnityID emails (depending on what you are using for login).

    Are you using UnityID? Why is a problem with the trigger to the email linked to your UnityID? I guess it's because you have personal emails linked to your UnityID.
     
    Emelkah likes this.
  3. Emelkah

    Emelkah

    Joined:
    Sep 22, 2014
    Posts:
    5

    Hi, I work in the same organisation.

    The problem is that we've been using these accounts for a long time and have always used our personal emails to log in.
    We connect to Version Control via our UnityIDs.

    This morning I tried to change my email address to the professional one. But it didn't have the desired effect.
    I don't know if it's a bug or not, but although I still have access to my account when I log in again with the new professional email, I've lost all the links with the organisation in the Unity Dashboard. I was no longer considered an owner and Version Control no longer saw me in the organisation.

    I was able to get everything back by re-setting the old email.
    But the problem remains the same, so we're forced to use our personal emails without being able to modify them, or we lose control of the organisation in the Dashboard.

    Does the Discord webhook retrieve email from the Unity Dashboard or from the Plastic Dashboard?
    If we create a new Plastic account with our pro email without using our UnityID, and we migrate our project, will the webhook use Plastic's ID?

    Our aim is actually to let this webhook inform the community of the project's progress on the game's official discord, every time we upload changes to the main branch. But showing our mail, personal or even professional, on a public server is problematic.

    Thank you.
     
  4. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    836
    HI @Emelkah, there is a known issue. If you change the email linked to your UnityID, please reach us at devops-vcs-support@unity3d.com so we can propagate this change to the Plastic SCM database.
    This way, you should be able to update your emails.

    Sorry for the inconvenience.
     
    Emelkah likes this.
  5. Emelkah

    Emelkah

    Joined:
    Sep 22, 2014
    Posts:
    5
    Thank you for the solution and your time.

    For the Discord webhook, we'll do without it until we find another solution or an update is made.
    We have friends that use Git as version control and when they hook it to discord it displays their username instead. So maybe this will be added in the future for Version Control, let's hope so! (or maybe just an option to make the email visible or not).
     
  6. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    836
    Hi @Emelkah, sure I will share your feedback with the product team. Your feedback is welcome.
     
    Emelkah likes this.
  7. Emelkah

    Emelkah

    Joined:
    Sep 22, 2014
    Posts:
    5
    Hello again !

    I've found a solution, but it creates another problem. I'm posting it here in case it helps anyone.

    By following this tutorial ( https://blog.plasticscm.com/2020/06/web-triggers-for-plastic-scm-cloud.html ), I was able to create a Webhook directly on our Plastic server using the Windows command prompt and the "after-checkin" trigger.

    Here's what it looks like:
    Discord_WPSUqRjrKa.png

    The problem we're currently experiencing is purely aesthetic. I'd like to be able to customise the appearance of this message but I can't find a tutorial. All I can do is manually customise the Webhook message after it has been published (via sites like Discohook).

    If you look at this tutorial ( https://blog.plasticscm.com/2021/03/how-to-connect-discord-and-plastic-scm.html ), you can see that the message appears differently, which is already better than what I have, even though the line of code is identical to the one I used.

    And this is what I'd like to have (or even better if I can find a way to customise it).
    chrome_Doeye7d4wT.png

    If anyone has a solution! I've already posted on the Plastic forum just in case. I'll come back and post here if they find a solution.

    Thanks !
     
  8. Emelkah

    Emelkah

    Joined:
    Sep 22, 2014
    Posts:
    5
    OK, we've found a temporary solution.

    Keeping the webhook from my post above, we're adding tags to our checkin messages directly in Unity, while we wait for an update to be made one day far in the future (never).

    Discord_2ltoKRxse5.png
    NVIDIA_Share_NCbdqvuQAg.png

    Now, I know that Version Control is in the middle of a transition, but all the other commit systems already offer ways of customising messages. It's not an ultra-important feature, but still.

    For information, the Discord tags: https://support.discord.com/hc/fr/a...ge-de-la-conversation-gras-italique-souligné-

    If that helps anyone.
     
    mathiasahrens likes this.
  9. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    836
    Hi @Emelkah, if I properly understand, you are not using the Cloud dashboard panel to enable the Discord integration because you want to customize the content of the messages so you decided to create your custom web triggers following the steps from these blog posts.

    If I properly understand, what you are asking is for feature requests so when you enable the Discord notifications via the Unity dashboard, you can somehow customize the information that is logged. Is this correct?

    Plastic SCM was rebranded to Unity DevOps Version Control but the product is not in the middle of a transition. We are adding more and more features every week and we are collecting feedback from the customers to keep improving the product in the future: https://www.plasticscm.com/download/releasenotes
     
  10. Emelkah

    Emelkah

    Joined:
    Sep 22, 2014
    Posts:
    5
    Hi @carlosalba1985, thanks for the reply!

    Yes, that's exactly what I mean.
    Currently, the Webhook Discord shows personal information such as email, which we'd like to avoid as we'd like the bot to be connected to a public Discord server.

    I created the current webhook via the windows console but later noticed that the result was the same when creating a simple webhook (not a Discord webhook) via the Plastic Dashboard. It's already better but I'd like to personalise the body of the message.

    And here's what I had before using the built-in Webhook Discord.
    DiscordBotMail01.png

    Here's a good example from a friend using GitHub, displaying the nickname instead.
    Discord_zzYflpTjM5.png
     
  11. ChromaEdge_Studios

    ChromaEdge_Studios

    Joined:
    Jun 27, 2023
    Posts:
    2
    I also come across this very issue with the email address popping up. I am locally using hooks to send to Discord, as I am developing solo with no team I just don't require the cloud version. Thing is I seen a few weeks ago you guys tried out the local server route of webhooks and didn't have the email show up but oddly for me it does? I been trying to sort out how to remove that as well...any pointers you guys figured out locally love to hear them.

    I am also encountering an issue I can't resolve with trying to remove a doubled up webhook via the CM. I accidently thought I forget one for CheckIns so I must have put in a second webhook for it, now the bot does fine on everything but those kick in twice every time. Also get an error because I redid things trying to sort through that and now the old webhook lingers so it tosses an error cause that first webhook I created is no longer on my Discord channel.

    I tried the command "cm trigger rm after-checkin 1" as per the documentation but every time it tosses that it doesn't exist in there (The specified trigger does not exist) yet I got a trigger working lol. I tried the "list" command it does nothing but repopulate a command line cursor, no feedback and I also tried the "edit" command and its just does the same thing. These changed or something? Any way to just reset the whole CM side back to default so I can redo? Not sure if there is a file I can edit. I tried uninstalling and reinstalling Unity DevOPS (Plastic SCM) but definitely the CM side stays persistent and figure there is something I need to force clean to get this back back to default without any triggers. I am just setting up my project so I figure toy with this integration before I dive into full time work.
     
    Last edited: Jun 27, 2023
  12. ChromaEdge_Studios

    ChromaEdge_Studios

    Joined:
    Jun 27, 2023
    Posts:
    2
    Nevermind as far as the removal...forgot to put in the server info is why it refused to show me the list, got that part sorted out lol. Love how I ask questions then figure it out all the time after
     
  13. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    836
    Hi @ChromaEdge_Studios, thanks for the update. Just to clarify, you would also like a way to customize the information of the Dicord trigger to avoid including the email?
     
  14. mattg_thirdsilence

    mattg_thirdsilence

    Joined:
    Aug 29, 2023
    Posts:
    1
    I'd also appreciate a way to customise the data shown in a discord trigger.
     
  15. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    836
    Thanks, we are sharing this with the product team.