Jump to content
AndrewC

[Custom Mergebots] Receive more information from WebSocketClient.cs

Recommended Posts

Hi there, I'm busy experimenting with custom mergebots and I'm using the trunk mergebot as a base and editing it from there.

What I want to do: I want to be able to listen for a changeset's attribute being changed, and not for a BranchAttributeChanged event.

What I've tried: I've looked at this documentation, and there are apparently only two different events that can be received through the WebSocket. I've made the mergebot log any messages received from the WebSocket, and it appears to only receive BranchAttributeChanged events.

Am I missing something obvious? Is there some setting I'm supposed to enable to make the server announce more events?

Running version 8.0.16.3219

Edit: I'm fairly new to this kind of programming. I come from a 3D/Unity/simulation programming background, so forgive me if this is a silly question.

Share this post


Link to post
Share on other sites

Hi,

Why do you need to listen for the attribute changed in a changeset? The goal of enabling mergebot is to automatize the merges of your task branches. When the branch attribute is set to resolve, mergebot tries to automatically merge/integrate it into your baseline (before passing your tests...).

Mergebot merges branches and that's why it listens to the branch attribute value.

Regards,

Carlos.

 

Share this post


Link to post
Share on other sites

Hi Carlos, thanks for your reply!

We're not working with the trunkbot currently (but we do plan to integrate it soon). We're trying to implement a policy of weekly super-stable releases that have been rigorously tested, thus we have an additional /release branch that /main merges into.

I'm currently making a custom mergebot, where whenever a changeset is marked as ready, the bot will merge the /main branch into the /release branch for other teams at our company to xlink to. The bot will also look at the comments of the changesets in /main and create release notes for other developers to read. The way I initially wanted it to work is for the bot to listen for a changeset in /main to have it's "release_status" attribute set to "ready", and it will merge that into main. It will also look at the comments of every changeset from the "ready" changeset all the way back to the previously released changeset (marked as "released") and generate release notes from there. When it's done, it'll mark the initial changeset as "released" and potentially label it.

If the WebSocket only announces the fact that a branch's attribute is changed, I guess I could instead make the mergebot poll the server to check for attribute changes? Or perhaps we're going about this all wrong. Either way, let me know.

Thanks,

Andrew

Share this post


Link to post
Share on other sites

Hi Carlos! Still wondering if there's a particular solution to this problem. I haven't had time to dig deeper into it. Even if there isn't an easy/established way to query a changeset's attributes, let me know :) 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...