Skip to content

feat: Allow user to set timeout of outgoing webhook - #31222

Merged
kodiakhq[bot] merged 2 commits into
RocketChat:developfrom
gracefulm:outgoing-webhook-timeout
Jan 5, 2024
Merged

feat: Allow user to set timeout of outgoing webhook#31222
kodiakhq[bot] merged 2 commits into
RocketChat:developfrom
gracefulm:outgoing-webhook-timeout

Conversation

@gracefulm

@gracefulm gracefulm commented Dec 13, 2023

Copy link
Copy Markdown
Contributor

Proposed changes (including videos or screenshots)

  • Motivation

    • There are times when I want to send a request that takes a long time to process using an outgoing webhook, but I cannot change the timeout from the default 20 seconds on the Script class side.
  • This change allows us to set the timeout as follows.

class Script {
   prepare_outgoing_request({ request }) {
     return {
       url: request.url + '/pulls',
       headers: request.headers,
       method: 'GET',
       timeout: 120000 // <- like this
     };
   }

   process_outgoing_response({ request, response }) {
     // do something...
   }
}

Issue(s)

Steps to test or reproduce

Further comments

@changeset-bot

changeset-bot Bot commented Dec 13, 2023

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 55a1c22

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gracefulm gracefulm changed the title [NEW]: Allow user to set timeout of outgoing webhook feat: Allow user to set timeout of outgoing webhook Dec 13, 2023
@gracefulm
gracefulm force-pushed the outgoing-webhook-timeout branch from 47238fd to 22d77fe Compare December 13, 2023 10:51
@gracefulm
gracefulm marked this pull request as ready for review December 13, 2023 11:05
@gracefulm
gracefulm force-pushed the outgoing-webhook-timeout branch 5 times, most recently from fbf0b19 to 101b4bd Compare December 19, 2023 12:14
@gracefulm
gracefulm force-pushed the outgoing-webhook-timeout branch from 1077b0f to b5ebc9a Compare December 28, 2023 07:16
@gracefulm
gracefulm force-pushed the outgoing-webhook-timeout branch from b5ebc9a to 4e7dc2e Compare December 28, 2023 22:29
@gracefulm
gracefulm force-pushed the outgoing-webhook-timeout branch from 4e7dc2e to d9c81ed Compare January 5, 2024 06:27
@codecov

codecov Bot commented Jan 5, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (47331ba) 49.35% compared to head (55a1c22) 49.36%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #31222      +/-   ##
===========================================
+ Coverage    49.35%   49.36%   +0.01%     
===========================================
  Files         3311     3308       -3     
  Lines        81366    81326      -40     
  Branches     16661    16652       -9     
===========================================
- Hits         40157    40147      -10     
+ Misses       36506    36488      -18     
+ Partials      4703     4691      -12     
Flag Coverage Δ
e2e 52.55% <ø> (+0.02%) ⬆️
e2e-api 40.68% <ø> (+<0.01%) ⬆️
unit 76.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@dionisio-bot dionisio-bot Bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: needs QA labels Jan 5, 2024
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label Jan 5, 2024
@dougfabris dougfabris added the stat: ready to merge PR tested and approved waiting for merge label Jan 5, 2024
@kodiakhq
kodiakhq Bot merged commit cf3f91f into RocketChat:develop Jan 5, 2024
gabriellsh added a commit that referenced this pull request Jan 5, 2024
…hideUi

* 'develop' of github.com:RocketChat/Rocket.Chat:
  chore: add gitpod config file for quick setup (#30921)
  feat: Allow user to set timeout of outgoing webhook (#31222)
  feat: added modal confirmation before pinning message (#31348)
  fix: not being able to access or create rooms with join code (#31270)
  chore: services changes on lifecycle methods + throw if svc is not available (#31375)
  test: bump playwright (#31376)
  i18n: update translations (#29462)
  i18n: adds video call translations for Persian language (#30406)
  regression: `AppRow` bundleIn verification (#31373)
  feat: Add Desktop PDF viewer (#31279)
  fix: Attachments not collapsing when using incoming webhook (#31318)
  chore: add aria-label to Select Inputs at Engagement Dashboard (#31249)
  fix: engagement dashboard timezone selector (#31248)
@gracefulm
gracefulm deleted the outgoing-webhook-timeout branch January 5, 2024 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: ready to merge PR tested and approved waiting for merge

Projects

Development

Successfully merging this pull request may close these issues.

4 participants