prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Improve integrations documentation in help center
  We should:
  - Rename /help/bots-and-integrations to "Bots overview" everywhere (sidebar, page title, page URL).
  - Add a copy of https://zulip.com/api/integrations-overview as the second page in the Bots & integrations section, titled "Integration overview"
  - Cross-link as appropriate, both in related articles and in the content of the pages.
  
  </issue>
  <code>
  [start of zerver/lib/url_redirects.py]
  1 from dataclasses import dataclass
  2 from typing import List
  3 
  4 
  5 @dataclass
  6 class URLRedirect:
  7     old_url: str
  8     new_url: str
  9 
  10 
  11 API_DOCUMENTATION_REDIRECTS: List[URLRedirect] = [
  12     # Add URL redirects for REST API documentation here:
  13     URLRedirect("/api/delete-stream", "/api/archive-stream"),
  14 ]
  15 
  16 POLICY_DOCUMENTATION_REDIRECTS: List[URLRedirect] = [
  17     # Add URL redirects for policy documentation here:
  18     URLRedirect("/privacy/", "/policies/privacy"),
  19     URLRedirect("/terms/", "/policies/terms"),
  20 ]
  21 
  22 HELP_DOCUMENTATION_REDIRECTS: List[URLRedirect] = [
  23     # Add URL redirects for help center documentation here:
  24     URLRedirect("/help/pm-mention-alert-notifications", "/help/dm-mention-alert-notifications"),
  25     URLRedirect("/help/restrict-private-messages", "/help/restrict-direct-messages"),
  26     URLRedirect("/help/reading-pms", "/help/reading-dms"),
  27     URLRedirect("/help/private-messages", "/help/direct-messages"),
  28     URLRedirect("/help/configure-who-can-edit-topics", "/help/restrict-moving-messages"),
  29     URLRedirect(
  30         "/help/configure-message-editing-and-deletion",
  31         "/help/restrict-message-editing-and-deletion",
  32     ),
  33     URLRedirect("/help/restrict-visibility-of-email-addresses", "/help/configure-email-visibility"),
  34     URLRedirect("/help/change-default-view", "/help/configure-default-view"),
  35     URLRedirect("/help/recent-topics", "/help/recent-conversations"),
  36     URLRedirect(
  37         "/help/add-custom-profile-fields",
  38         "/help/custom-profile-fields",
  39     ),
  40     URLRedirect(
  41         "/help/enable-enter-to-send",
  42         "/help/mastering-the-compose-box#toggle-between-ctrl-enter-and-enter-to-send-a-message",
  43     ),
  44     URLRedirect(
  45         "/help/change-the-default-language-for-your-organization",
  46         "/help/configure-organization-language",
  47     ),
  48     URLRedirect("/help/delete-a-stream", "/help/archive-a-stream"),
  49     URLRedirect("/help/change-the-topic-of-a-message", "/help/rename-a-topic"),
  50     URLRedirect("/help/configure-missed-message-emails", "/help/email-notifications"),
  51     URLRedirect("/help/add-an-alert-word", "/help/dm-mention-alert-notifications#alert-words"),
  52     URLRedirect("/help/test-mobile-notifications", "/help/mobile-notifications"),
  53     URLRedirect(
  54         "/help/troubleshooting-desktop-notifications",
  55         "/help/desktop-notifications#troubleshooting-desktop-notifications",
  56     ),
  57     URLRedirect(
  58         "/help/change-notification-sound", "/help/desktop-notifications#change-notification-sound"
  59     ),
  60     URLRedirect("/help/configure-message-notification-emails", "/help/email-notifications"),
  61     URLRedirect("/help/disable-new-login-emails", "/help/email-notifications#new-login-emails"),
  62     # The `help/about-streams-and-topics` redirect is particularly important,
  63     # because the old URL appears in links from Welcome Bot messages.
  64     URLRedirect("/help/about-streams-and-topics", "/help/streams-and-topics"),
  65     URLRedirect("/help/community-topic-edits", "/help/restrict-moving-messages"),
  66     URLRedirect(
  67         "/help/only-allow-admins-to-add-emoji", "/help/custom-emoji#change-who-can-add-custom-emoji"
  68     ),
  69     URLRedirect(
  70         "/help/configure-who-can-add-custom-emoji",
  71         "/help/custom-emoji#change-who-can-add-custom-emoji",
  72     ),
  73     URLRedirect("/help/add-custom-emoji", "/help/custom-emoji"),
  74     URLRedirect("/help/night-mode", "/help/dark-theme"),
  75     URLRedirect("/help/enable-emoticon-translations", "/help/configure-emoticon-translations"),
  76     URLRedirect("/help/web-public-streams", "/help/public-access-option"),
  77     URLRedirect("/help/starting-a-new-private-thread", "/help/starting-a-new-direct-message"),
  78     URLRedirect("/help/edit-or-delete-a-message", "/help/delete-a-message"),
  79     URLRedirect("/help/start-a-new-topic", "/help/starting-a-new-topic"),
  80     URLRedirect("/help/configure-default-view", "/help/configure-home-view"),
  81     URLRedirect("/help/reading-topics", "/help/reading-conversations"),
  82     URLRedirect("/help/finding-a-topic-to-read", "/help/finding-a-conversation-to-read"),
  83     URLRedirect("/help/view-and-browse-images", "/help/view-images-and-videos"),
  84 ]
  85 
  86 LANDING_PAGE_REDIRECTS = [
  87     # Add URL redirects for corporate landing pages here.
  88     URLRedirect("/new-user/", "/hello/"),
  89     URLRedirect("/developer-community/", "/development-community"),
  90     URLRedirect("/for/companies/", "/for/business"),
  91     URLRedirect("/for/working-groups-and-communities/", "/for/communities"),
  92 ]
  93 
  94 DOCUMENTATION_REDIRECTS = (
  95     API_DOCUMENTATION_REDIRECTS + POLICY_DOCUMENTATION_REDIRECTS + HELP_DOCUMENTATION_REDIRECTS
  96 )
  97
  [end of zerver/lib/url_redirects.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/zerver/lib/url_redirects.py b/zerver/lib/url_redirects.py
  --- a/zerver/lib/url_redirects.py
  +++ b/zerver/lib/url_redirects.py
  @@ -81,6 +81,7 @@
       URLRedirect("/help/reading-topics", "/help/reading-conversations"),
       URLRedirect("/help/finding-a-topic-to-read", "/help/finding-a-conversation-to-read"),
       URLRedirect("/help/view-and-browse-images", "/help/view-images-and-videos"),
  +    URLRedirect("/help/bots-and-integrations", "/help/bots-overview"),
   ]
   
   LANDING_PAGE_REDIRECTS = [
  
verification_info: {"golden_diff": "diff --git a/zerver/lib/url_redirects.py b/zerver/lib/url_redirects.py\n--- a/zerver/lib/url_redirects.py\n+++ b/zerver/lib/url_redirects.py\n@@ -81,6 +81,7 @@\n     URLRedirect(\"/help/reading-topics\", \"/help/reading-conversations\"),\n     URLRedirect(\"/help/finding-a-topic-to-read\", \"/help/finding-a-conversation-to-read\"),\n     URLRedirect(\"/help/view-and-browse-images\", \"/help/view-images-and-videos\"),\n+    URLRedirect(\"/help/bots-and-integrations\", \"/help/bots-overview\"),\n ]\n \n LANDING_PAGE_REDIRECTS = [\n", "issue": "Improve integrations documentation in help center\nWe should:\r\n- Rename /help/bots-and-integrations to \"Bots overview\" everywhere (sidebar, page title, page URL).\r\n- Add a copy of https://zulip.com/api/integrations-overview as the second page in the Bots & integrations section, titled \"Integration overview\"\r\n- Cross-link as appropriate, both in related articles and in the content of the pages.\n", "before_files": [{"content": "from dataclasses import dataclass\nfrom typing import List\n\n\n@dataclass\nclass URLRedirect:\n    old_url: str\n    new_url: str\n\n\nAPI_DOCUMENTATION_REDIRECTS: List[URLRedirect] = [\n    # Add URL redirects for REST API documentation here:\n    URLRedirect(\"/api/delete-stream\", \"/api/archive-stream\"),\n]\n\nPOLICY_DOCUMENTATION_REDIRECTS: List[URLRedirect] = [\n    # Add URL redirects for policy documentation here:\n    URLRedirect(\"/privacy/\", \"/policies/privacy\"),\n    URLRedirect(\"/terms/\", \"/policies/terms\"),\n]\n\nHELP_DOCUMENTATION_REDIRECTS: List[URLRedirect] = [\n    # Add URL redirects for help center documentation here:\n    URLRedirect(\"/help/pm-mention-alert-notifications\", \"/help/dm-mention-alert-notifications\"),\n    URLRedirect(\"/help/restrict-private-messages\", \"/help/restrict-direct-messages\"),\n    URLRedirect(\"/help/reading-pms\", \"/help/reading-dms\"),\n    URLRedirect(\"/help/private-messages\", \"/help/direct-messages\"),\n    URLRedirect(\"/help/configure-who-can-edit-topics\", \"/help/restrict-moving-messages\"),\n    URLRedirect(\n        \"/help/configure-message-editing-and-deletion\",\n        \"/help/restrict-message-editing-and-deletion\",\n    ),\n    URLRedirect(\"/help/restrict-visibility-of-email-addresses\", \"/help/configure-email-visibility\"),\n    URLRedirect(\"/help/change-default-view\", \"/help/configure-default-view\"),\n    URLRedirect(\"/help/recent-topics\", \"/help/recent-conversations\"),\n    URLRedirect(\n        \"/help/add-custom-profile-fields\",\n        \"/help/custom-profile-fields\",\n    ),\n    URLRedirect(\n        \"/help/enable-enter-to-send\",\n        \"/help/mastering-the-compose-box#toggle-between-ctrl-enter-and-enter-to-send-a-message\",\n    ),\n    URLRedirect(\n        \"/help/change-the-default-language-for-your-organization\",\n        \"/help/configure-organization-language\",\n    ),\n    URLRedirect(\"/help/delete-a-stream\", \"/help/archive-a-stream\"),\n    URLRedirect(\"/help/change-the-topic-of-a-message\", \"/help/rename-a-topic\"),\n    URLRedirect(\"/help/configure-missed-message-emails\", \"/help/email-notifications\"),\n    URLRedirect(\"/help/add-an-alert-word\", \"/help/dm-mention-alert-notifications#alert-words\"),\n    URLRedirect(\"/help/test-mobile-notifications\", \"/help/mobile-notifications\"),\n    URLRedirect(\n        \"/help/troubleshooting-desktop-notifications\",\n        \"/help/desktop-notifications#troubleshooting-desktop-notifications\",\n    ),\n    URLRedirect(\n        \"/help/change-notification-sound\", \"/help/desktop-notifications#change-notification-sound\"\n    ),\n    URLRedirect(\"/help/configure-message-notification-emails\", \"/help/email-notifications\"),\n    URLRedirect(\"/help/disable-new-login-emails\", \"/help/email-notifications#new-login-emails\"),\n    # The `help/about-streams-and-topics` redirect is particularly important,\n    # because the old URL appears in links from Welcome Bot messages.\n    URLRedirect(\"/help/about-streams-and-topics\", \"/help/streams-and-topics\"),\n    URLRedirect(\"/help/community-topic-edits\", \"/help/restrict-moving-messages\"),\n    URLRedirect(\n        \"/help/only-allow-admins-to-add-emoji\", \"/help/custom-emoji#change-who-can-add-custom-emoji\"\n    ),\n    URLRedirect(\n        \"/help/configure-who-can-add-custom-emoji\",\n        \"/help/custom-emoji#change-who-can-add-custom-emoji\",\n    ),\n    URLRedirect(\"/help/add-custom-emoji\", \"/help/custom-emoji\"),\n    URLRedirect(\"/help/night-mode\", \"/help/dark-theme\"),\n    URLRedirect(\"/help/enable-emoticon-translations\", \"/help/configure-emoticon-translations\"),\n    URLRedirect(\"/help/web-public-streams\", \"/help/public-access-option\"),\n    URLRedirect(\"/help/starting-a-new-private-thread\", \"/help/starting-a-new-direct-message\"),\n    URLRedirect(\"/help/edit-or-delete-a-message\", \"/help/delete-a-message\"),\n    URLRedirect(\"/help/start-a-new-topic\", \"/help/starting-a-new-topic\"),\n    URLRedirect(\"/help/configure-default-view\", \"/help/configure-home-view\"),\n    URLRedirect(\"/help/reading-topics\", \"/help/reading-conversations\"),\n    URLRedirect(\"/help/finding-a-topic-to-read\", \"/help/finding-a-conversation-to-read\"),\n    URLRedirect(\"/help/view-and-browse-images\", \"/help/view-images-and-videos\"),\n]\n\nLANDING_PAGE_REDIRECTS = [\n    # Add URL redirects for corporate landing pages here.\n    URLRedirect(\"/new-user/\", \"/hello/\"),\n    URLRedirect(\"/developer-community/\", \"/development-community\"),\n    URLRedirect(\"/for/companies/\", \"/for/business\"),\n    URLRedirect(\"/for/working-groups-and-communities/\", \"/for/communities\"),\n]\n\nDOCUMENTATION_REDIRECTS = (\n    API_DOCUMENTATION_REDIRECTS + POLICY_DOCUMENTATION_REDIRECTS + HELP_DOCUMENTATION_REDIRECTS\n)\n", "path": "zerver/lib/url_redirects.py"}]}