Accelerate Github code reviews with Zoho Cliq Platform's link handlers

Accelerate Github code reviews with Zoho Cliq Platform's link handlers



Code reviews are critical, and they can get buried in conversations or lost when using multiple tools. With the Cliq Platform's link handlers, let's transform shared Github pull request links into interactive, real-time code reviews on channels. Share PR links in any reviewer groups or channels to get approval or receive review comments instantly.

Pre-requisites:

  • Connection creation :

  • Creation of form function

    • To create a form function, navigate to Bots & Tools and select "Functions."

    • On the right side, click "Create Function" and name it "addCommentPullRequest."

    • Set the Function Type to "Form." The purpose of this function will be explained in Step 4.

Step 1: Create an extension and add a link handler

  • After successfully logging into Cliq, hover over the top right corner and click on your profile. Then navigate to Bots & Tools > My Extensions.
  • On the right side, click the Create Extension button.
  • To learn more about extensions and their purposes, refer to the Introduction to Extensions.
  • Create an extension using your preferred name. Please specify the following details: the extension name, a description (to help users understand the extension's purpose), and an image to identify it.
  • Under the link handlers section, enter github.com to configure the extension to preview links for that domain.
  • Bundle the newly created form function - addCommentPullRequest, as it is mandatory to include at least one component to an extension, and then click Create.

 

Step 2: Configuring the preview handler

  • After creating an extension, a popup will appear that provides an overview, which includes information about the extension. It will also list the connectors, showing the components bundled with the extension and their associated app keys.
  • Additionally, handlers will allow you to configure access, customize settings, and manage links within the extension.
  • Navigate to handlers, scroll down, and under link handlers, hover over to preview handler.

  • The Preview Handler expands a rich response when a URL is shared in a conversation. Click edit code and copy and paste the script below.
Script
  1. pullRequest_url = url;
  2. owner = pullRequest_url.getSuffix(".com/").getPrefix("/");
  3. pullRequest_ID = pullRequest_url.substring(pullRequest_url.lastIndexOf("/pull/") + 6);
  4. repositoryName = pullRequest_url.substring(pullRequest_url.indexOf("github.com/") + 11,pullRequest_url.lastIndexOf("/pull/"));
  5. // Fetch PR details from GitHub API
  6. getPRDetails = invokeurl
  7. [
  8. url :"https://api.github.com/repos/" + repositoryName + "/pulls/" + pullRequest_ID
  9. type :GET
  10. connection:"githubforcliq"
  11. ];
  12. // Parse API response
  13. pr_title = getPRDetails.get("title");
  14. pr_author = getPRDetails.get("user").get("login");
  15. changed_files = getPRDetails.get("changed_files");
  16. arguments = Map();
  17. arguments.put("pullRequest_ID",pullRequest_ID);
  18. arguments.put("repositoryName",repositoryName);
  19. arguments.put("owner",owner);
  20. arguments.put("pr_title",pr_title);
  21. arguments.put("pr_author",pr_author);
  22. arguments.put("changed_files",changed_files);
  23. // Build preview response
  24. response = {"title":"Pull Request -" + pr_title,"type":"link","provider_url":pullRequest_url,"faviconlink":"https://zoho.com/sites/default/files/cliq/images/githubmark.png","thumbnail_url":"https://zoho.com/sites/default/files/cliq/images/githubmark.png","fields":{"data":{{"label":"Author","value":pr_author},{"label":"Files Changed","value":changed_files}}},"actions":{{"hint":"Approve a pull request instantly","style":"+","label":"Approve","type":"button","params":arguments},{"hint":"Add review comments to the pull request","label":"Add a comment","type":"button","params":arguments}}};
  25. return response;

Step 3: Configuring the action handler

  • We have refined the response of the pull request URL when it is shared in a Cliq conversation. Now, we need to define the actions to be performed when the buttons in the unfurled response are clicked.
  • This can be configured in the action handler. To locate it, navigate to the extension handlers. Scroll down to find the link handlers section, then hover over to the action handler.
  • The action handler executes actions when the buttons in the unfurled card are clicked. Click "Edit Code" and copy and paste the script below.
Script
  1. label = target.get("label");
  2. pullRequest_ID = target.get("params").get("pullRequest_ID");
  3. repositoryName = target.get("params").get("repositoryName");
  4. owner = target.get("params").get("owner");
  5. response = Map();
  6. if(label.equals("Approve"))
  7. {
  8. params = Map();
  9. params.put("event","APPROVE");
  10. headers = Map();
  11. headers.put("Content-Type","application/json");
  12. approvePullRequest = invokeurl
  13. [
  14. url :"https://api.github.com/repos/" + owner + "/" + repositoryName.getSuffix("/") + "/pulls/" + pullRequest_ID + "/reviews"
  15. type :POST
  16. parameters:params + ""
  17. headers:headers
  18. detailed:true
  19. connection:"githubforcliq"
  20. ];
  21. info approvePullRequest;
  22. responseCode = approvePullRequest.get("responseCode");
  23. if(responseCode == 200)
  24. {
  25. pull_request_url = approvePullRequest.get("responseText").get("pull_request_url");
  26. pr_title = target.get("params").get("pr_title");
  27. pr_author = target.get("params").get("pr_author");
  28. changed_files = target.get("params").get("changed_files");
  29. response = {"card":{"title":"✅ Pull Request Approved","theme":"modern-inline"},"buttons":{{"label":"View Pull Request","hint":"","type":"+","action":{"type":"open.url","data":{"web":pull_request_url}}}},"text":"*Pull Request* :" + pr_title + "\n*Author* : " + pr_author + "\n*Files changed*:" + changed_files};
  30. return response;
  31. }
  32. else
  33. {
  34. banner = {"text":"Pull request approval failed!","status":"failure","type":"banner"};
  35. return banner;
  36. }
  37. }
  38. else
  39. {
  40. return {"type":"form","title":"Add Review Comment","name":"addComment","button_label":"Add","inputs":{{"label":"Review Comment","name":"comment","placeholder":"Leave a note for the author or your team","min_length":"0","max_length":"500","mandatory":true,"type":"textarea"},{"name":"pullRequest_ID","value":pullRequest_ID,"type":"hidden"},{"name":"repositoryName","value":repositoryName,"type":"hidden"},{"name":"owner","value":owner,"type":"hidden"}},"action":{"type":"invoke.function","name":"addCommentPullRequest"}};
  41. }
  42. return Map();
 

Step 4: Handling the form submit handler to add comments to a pull request

  • When clicking the "Add a comment" button, a form will be triggered to allow users to add comments in the specified multi-line input text field. This form should be submitted using the form functions in Cliq.
  • To create this function, navigate to Bots & Tools > Functions. On the right side, click "Create Function" and name the function "addCommentPullRequest." Choose the Function Type as "Form."
  • After that, click "Save & Edit Code" and paste the script provided below. 
Script : addCommentPullRequest - Form Submit Handler
  1. response = Map();
  2. formValues = form.get("values");
  3. pullRequest_ID = formValues.get("pullRequest_ID");
  4. repositoryName = formValues.get("repositoryName");
  5. owner = formValues.get("owner");
  6. comment = formValues.get("comment");
  7. params = Map();
  8. params.put("body",comment);
  9. params.put("event","COMMENT");
  10. headers = Map();
  11. headers.put("Content-Type","application/json");
  12. addComment = invokeurl
  13. [
  14. url :"https://api.github.com/repos/" + owner + "/" + repositoryName.getSuffix("/") + "/pulls/" + pullRequest_ID + "/reviews"
  15. type :POST
  16. parameters:params + ""
  17. headers:headers
  18. detailed:true
  19. connection:"githubforcliq"
  20. ];
  21. info addComment;
  22. responseCode = addComment.get("responseCode");
  23. if(responseCode == 200)
  24. {
  25. banner = {"text":"Comment added to the pull request","status":"success","type":"banner"};
  26. return banner;
  27. }
  28. else
  29. {
  30. banner = {"text":"Unable to add review comments!","status":"failure","type":"banner"};
  31. return banner;
  32. }
  33. return Map(); 

Note :

You need to configure the app link to get a rich, unfurled response for the GitHub PR links posted in any chat. Refer to the link below to configure the unfurl link in Zoho Cliq.

🔄 Workflow explanation  

With this custom solution, GitHub Pull Requests can be shared instantly in any chat, group, or channel to get them reviewed by designated reviewers or top collaborators of the repository.
 

💼 Business benefits  

  • Faster review cycles – Reduces turnaround time by bringing PRs directly into team conversations.
  • Improved code quality – Promotes timely feedback from key collaborators and senior reviewers.
  • Increased developer visibility – Ensures pull requests don’t go unnoticed or remain idle.
  • Streamlined collaboration – Centralizes communication around code changes, reducing context-switching. 
No more gaps between the coding lifecycle and collaboration. Implementing rich previews for GitHub pull requests speeds up the development process, leading to better visibility, quicker feedback, and more substantial code ownership.

We're here to help, so don't hesitate to reach out to support@zohocliq.com with any questions or if you need assistance in crafting even more tailored workflows.

    • Sticky Posts

    • Automating Employee Birthday Notifications in Zoho Cliq

      Have you ever missed a birthday and felt like the office Grinch? Fear not, the Cliq Developer Platform has got your back! With Zoho Cliq's Schedulers, you can be the office party-cipant who never forgets a single cake, balloon, or awkward rendition of
    • Accelerate Github code reviews with Zoho Cliq Platform's link handlers

      Code reviews are critical, and they can get buried in conversations or lost when using multiple tools. With the Cliq Platform's link handlers, let's transform shared Github pull request links into interactive, real-time code reviews on channels. Share
    • App Spotlight : PagerDuty for Zoho Cliq

      App Spotlight brings you hand-picked apps to enhance the power of your Zoho apps and tools. Visit the Zoho Marketplace to explore all of our apps, integrations, and extensions. In today's fast-paced world, seizing every moment is essential for operational
    • Automate your status with Cliq Schedulers

      Imagine enjoying your favorite homemade meal during a peaceful lunch break, when suddenly there's a PING! A notification pops up and ruins your moment of zen. Even worse, you might be in a vital product development sprint, only to be derailed by a "quick
    • Bulk user onboarding for Cliq Channels in a jiffy

      As developers, we frequently switch between coding, debugging, and optimizing tasks. The last thing we want is to be burdened by manual user management. Adding users one by one to a channel is tedious and prone to errors, taking up more time than we could
    • Recent Topics

    • CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive

      Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
    • Has anyone integrated SMS well for Zoho Desk?

      Our company does property management and needs to be able to handle inbound sms messages which create a ticket for Zoho Desk. We then need to be able to reply back from Zoho desk which sends the user an sms message. This seems like a fairly common thing
    • populate email address and name in zoho desk?

      Is it possible to populate the email address and name in the zoho desk widget? We only use it in the context of an authenticated user, so we already know the user's name and email. Thanks,
    • Are there default/pre-built dashboards in Zoho Desk?

      Hi, I am looking for some pre-built dashboard templates in Zoho Desk, similar to what we can find in CRM/Projects, etc Thank you
    • Add image to report...

      Greetings, I send a weekly color coded report via Creator email. I would like to add the legend somewhere in the report. Header, footer where ever. I have the legend saved on Google Drive and can access it via shared link. Sure someone has wanted to add
    • Enable Locations for Expense

      Hi, please enable Locations (ex Branches) for Zoho Expense so that there is consistency between this app and Zoho Books. Thanks in advance.
    • Adding branded signature to tickets reply

      Hi, i am unable to figure out how to add signatures with logo to tickets reply. please advice .
    • Zoho Calendar not working since a few days

      Hey there, first off a minor thing, since I just tried to enable the Calendar after reading this in another topic (there was no setting for this though) : For some reason my current session is showing me based in New York - I'm in Germany, not using a
    • Settings Icon No Longer in ZOHO Desk?

      In ZOHO desk, there has been a gear icon for settings. as of yesterday, it is no longer there. I showed up briefly this morning but is gone again. Anybody else experiecing this?
    • Zoho Marketing Automation 2.0 - Landing Page function not working

      Dear Zoho Team, I am working on implementing Zoho Marketing Automation 2.0, and am now looking into the section "Lead Generation". If I open the "Landing Pages" section, I immediately get an Error code: Error: internal error occurred. Can you help me
    • WebDAV / FTP / SFTP protocols for syncing

      I believe the Zoho for Desktop app is built using a proprietary protocol. For the growing number of people using services such as odrive to sync multiple accounts from various providers (Google, Dropbox, Box, OneDrive, etc.) it would be really helpful if you implemented standard protocols such as WebDAV / FTP / SFTP so that alternative inc clients can be used.
    • Zoho Mail Android app update: Manage folders

      Hello everyone! In the latest version(v2.9) of the Zoho Mail Android app update, we have brought in support for an option to manage folders. You can now create, edit, and delete folders from within the mobile app. You can also manage folders for the POP
    • How to share ticket numbers across different ticket types

      I'm running an event and have three different ticket types. Add on Event + Main Event - Early bird Main Event only - Early bird Add on Event only - Early bird And Standard class - shown but not available until early bird finishes Add on Event + Main Event
    • Adding Social Media Buttons to Basic Campaigns

      Hi, I'm quote new to using Zoho Campaigns and I can't work out how to add Social Media Buttons into my basic campaign? In MailChimp there's a button that brings the icons into your campaign for you. I've tried adding the social media icons as 'buttons' in Zoho but it's not looking great. Can anyone help? Thanks!
    • Hide Inactive Social Sign-In Providers from Login Screen

      Hello Zoho Team, We hope you are doing well. Currently, Zoho One allows admins to configure security policies and enable or disable Social Sign-In options for third-party providers such as Apple, Google, Microsoft, LinkedIn, Yahoo, Twitter, Facebook,
    • Zoho Cliq not working on airplanes

      Hi, My team and I have been having this constant issue of cliq not working when connected to an airplane's wifi. Is there a reason for this? We have tried on different Airlines and it doesn't work on any of them. We need assistance here since we are constantly
    • Calls to accounts rather than leads or contacts?

      So..... We have a dilemma and I'm hoping someone has encountered this before and figured out a fix. We have just migrated to Zoho. It's great.....expect for how "Calls" are handled.... We are B2B. We do not use the leads module. A "Lead/Prospect" for
    • LESS_THAN_MIN_OCCURANCE - code 2945

      Hi I'm trying to post a customer record to creator API and getting this error message. So cryptic. Can someone please help? Thanks Varun
    • Sending emails from an outlook account

      Hi, I need to know if it's possible to send automatic emails from an Outlook account configured in Zoho CRM and, if so, how I can accomplish that. To give you some context, I set up a domain and created a function that generates PDF files to be sent later
    • [Free Webinar] AI Agents in Zoho Creator - Creator Tech Connect

      Hello Everyone! We welcome you all to the upcoming free webinar on the Creator Tech Connect Series. The Creator Tech Connect series is a free monthly webinar that runs for around 45 minutes. It comprises technical sessions in which we delve deep into
    • Can Zoho Flows repeat Actions more than once?

      I'm attempting to make an intentional Zoho Flow loop using the below layout. However, when "WithinLimit" condition is met, the program fails to execute the action "Get & Add Request Co..." again. Is this by design? Is Zoho Flows unable to repeat actions
    • How to update "Lead Status" to more than 100 records

      Hello Zoho CRM, How do I update "Lead Status" to more than 100 records at once? To give you a background, these leads were uploaded or Imported at once but the lead status record was incorrectly chosen. So since there was a way to quickly add records in the system no matter how many they are, we are also wondering if there is a quicker way to update these records to the correct "Lead Status". I hope our concern makes sense and that there will be a fix for it. All the best, Jonathan
    • Ship via Carrier Not Working Since Commerce Update

      Since the recent update to the Commerce platform, I can no longer use the ship via carrier function. It will take me to the address screen and let me verify them but when I go to save and move tot he next screen it will not do anything. This is happening
    • automations: Can I execute a step on a specific date?

      I have created a form in Zoho forms, and created a contacts list. I have also begun setting up an automation with the intention of sending the form to the contact list on a specific date every month (via email) for the entire year (essentially sending
    • Nimble enhancements to WhatsApp for Business integration in Zoho CRM: Enjoy context and clarity in business messaging

      Dear Customers, We hope you're well! WhatsApp for business is a renowned business messaging platform that takes your business closer to your customers; it gives your business the power of personalized outreach. Using the WhatsApp for Business integration
    • Image Upload Field | Zoho Canvas

      I'm working on making a custom view for one of our team's modules. It's an image upload field (Placement Photo) that would allow our sales reps to upload a picture of the house their working on. However, I don't see that field as a opinion when building
    • Zoho sheet desktop version

      Hi Zoho team Where can I access desktop version of zoho sheets? It is important as web version is slow and requires one to be online all the time to do even basic work. If it is available, please guide me to the same.
    • Zoho Expense - The ability to add detail to a Trip during booking

      As an admin, I would like the ability to add more detail to the approved Trips. At present a requestor can add flights, accommodation details and suggest their preferences. It would be great if the exact details of the trip could be added either by the
    • Simplified Call Logging

      Our organization would like to start logging calls in our CRM; however, with 13 fields that can't be removed, our team is finding it extremely cumbersome. For our use case, we only need to record that a call happened theirfor would only need the following
    • Signup forms behaviour : Same email & multiple submissions

      My use case is that I have a signup form (FormA) that I use in several places on my website, with a hidden field so I can see where the contact has been made from. I also have a couple of other signup forms (FormB and FormC) that slight differences. All
    • Adding Folders in Android App

      Is it possible to create a new email folder within the Zoho Mail Android app?  Or can this only be done from the desktop version of Zoho Mail? Cheers!
    • Schedule Exports for Regular Project Updates

      Tracking project data often means exporting data at regular intervals. Instead of manually exporting data every time, users can schedule exports for Phases, Tasks, and Tasks in Zoho Projects. These exports can be set to run once, daily, weekly, or monthly
    • Question about custom fields using Pivot Tables.

      I have created a pivot table showing annual revenue of a client and how much payment that client is paying my company. Is there a way using pivot table to add an additional field that subtracts those to fields / shows me a percentage of that difference?
    • Request for Light/Dark Mode

      Would love the ability to switch between Light and Dark mode similar to Zoho CRM. https://help.zoho.com/portal/en/community/topic/introducing-dark-mode-light-mode-a-new-look-for-your-crm
    • Signature field is showing black

      Hello, When customer signed the service form, it is showing as below picture Phone model: iPhone 16 Pro We tried delete and install application, but it not solved. This has on phone of a few person. There is any advice to solve this?
    • Range names in Zoho Sheet are BROKEN!

      Hi - you've pushed an update that has broken range names. A previously working spreadsheet now returns errors because the range names are not updating the values correctly. I've shared a video with the support desk to illustrate the problem. This spreadsheet
    • Journey Email - Ignored Contacts

      I have a journey setup which simply sends a string of emails over time. For some reason I am getting large amounts of the contacts who enter the first email being ignored and I can't find anywhere in reports or audit logs why these contacts are not
    • Involved account types are not applicable when create journals

      { "journal_date": "2016-01-31", "reference_number": "20160131", "notes": "SimplePay Payroll", "line_items": [{ "account_id": "538624000000035003", "description": "Net Pay", "amount": 26690.09, "debit_or_credit": "credit" }, { "account_id": "538624000000000403", "description": "Gross", "amount": 32000, "debit_or_credit": "debit" }, { "account_id": "538624000000000427", "description": "CPP", "amount": 1295.64, "debit_or_credit": "debit" }, { "account_id": "538624000000000376", "description":
    • Zoho Books - Include Payment Terms as a Custom View filter

      It would be great if you could created a custom view based on Payment Terms. This would be really handy for seeing a list of customers who have credit terms. A workaround is not required. I could do something with a creditor checkbox, but it would be
    • How to update changed purchase account of item in invoice

      I have selected the wrong purchase account for various articles and created invoices. I had to adjust the purchase account in the article afterwards, but the old purchase account is still posted in the transaction-journal of the invoice. To adjust the
    • Next Page