prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Remove check for PR links to issue IDs
          > If this is a pain there are 2 options:
  
  It does just seem to be the most common type of misconfiguration, which I bump into on almost every code review or submission.
  
  I'm not sure it's providing enough value to be worth the hassle, so perhaps disabling would be best for now.  The "fixes:" line does most of the work.
  
  _Originally posted by @glyph in https://github.com/twisted/twisted/issues/11747#issuecomment-1304901054_
        
  
  </issue>
  <code>
  [start of .github/scripts/check-pr-text.py]
  1 #
  2 # This script is designed to be called by the GHA workflow.
  3 #
  4 # It is designed to check that the PR text complies to our dev standards.
  5 #
  6 # The input is received via the environmet variables:
  7 # * PR_TITLE - title of the PR
  8 # * PR_BODY - the description of the PR
  9 #
  10 # To test it run
  11 #
  12 # $ export PR_TITLE='#1234 Test Title'
  13 # $ export PR_BODY='some lines
  14 # > Fixes #12345
  15 # > more lines'
  16 # $ python3 .github/scripts/check-pr-text.py
  17 #
  18 import os
  19 import re
  20 import sys
  21 
  22 pr_title = os.environ.get("PR_TITLE", "")
  23 pr_body = os.environ.get("PR_BODY", "")
  24 
  25 print("--- DEBUG ---")
  26 print(f"Title: {pr_title}")
  27 print(f"Body:\n {pr_body}")
  28 print("-------------")
  29 
  30 
  31 def fail(message):
  32     print(message)
  33     print("Fix the title and then trigger a new push.")
  34     print("A re-run for this job will not work.")
  35     sys.exit(1)
  36 
  37 
  38 if not pr_title:
  39     fail("Title for the PR not found. " "Maybe missing PR_TITLE env var.")
  40 
  41 if not pr_body:
  42     fail("Body for the PR not found. " "Maybe missing PR_BODY env var.")
  43 
  44 title_search = re.search(r"^(#\d+):? .+", pr_title)
  45 if not title_search:
  46     fail(
  47         "Title of PR has no issue ID reference. It must look like “#1234 Foo bar baz”."
  48     )
  49 else:
  50     print(f"PR title is complaint for {title_search[1]}. Good job.")
  51 
  52 
  53 body_search = re.search(r".*Fixes (#\d+).+", pr_body)
  54 if not body_search:
  55     fail('Body of PR has no "Fixes #12345" issue ID reference.')
  56 else:
  57     print(f"PR description is complaint for {body_search[1]}. Good job.")
  58 
  59 
  60 if title_search[1] != body_search[1]:
  61     fail("PR title and description have different IDs.")
  62 
  63 # All good.
  64 sys.exit(0)
  65
  [end of .github/scripts/check-pr-text.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/.github/scripts/check-pr-text.py b/.github/scripts/check-pr-text.py
  deleted file mode 100644
  --- a/.github/scripts/check-pr-text.py
  +++ /dev/null
  @@ -1,64 +0,0 @@
  -#
  -# This script is designed to be called by the GHA workflow.
  -#
  -# It is designed to check that the PR text complies to our dev standards.
  -#
  -# The input is received via the environmet variables:
  -# * PR_TITLE - title of the PR
  -# * PR_BODY - the description of the PR
  -#
  -# To test it run
  -#
  -# $ export PR_TITLE='#1234 Test Title'
  -# $ export PR_BODY='some lines
  -# > Fixes #12345
  -# > more lines'
  -# $ python3 .github/scripts/check-pr-text.py
  -#
  -import os
  -import re
  -import sys
  -
  -pr_title = os.environ.get("PR_TITLE", "")
  -pr_body = os.environ.get("PR_BODY", "")
  -
  -print("--- DEBUG ---")
  -print(f"Title: {pr_title}")
  -print(f"Body:\n {pr_body}")
  -print("-------------")
  -
  -
  -def fail(message):
  -    print(message)
  -    print("Fix the title and then trigger a new push.")
  -    print("A re-run for this job will not work.")
  -    sys.exit(1)
  -
  -
  -if not pr_title:
  -    fail("Title for the PR not found. " "Maybe missing PR_TITLE env var.")
  -
  -if not pr_body:
  -    fail("Body for the PR not found. " "Maybe missing PR_BODY env var.")
  -
  -title_search = re.search(r"^(#\d+):? .+", pr_title)
  -if not title_search:
  -    fail(
  -        "Title of PR has no issue ID reference. It must look like “#1234 Foo bar baz”."
  -    )
  -else:
  -    print(f"PR title is complaint for {title_search[1]}. Good job.")
  -
  -
  -body_search = re.search(r".*Fixes (#\d+).+", pr_body)
  -if not body_search:
  -    fail('Body of PR has no "Fixes #12345" issue ID reference.')
  -else:
  -    print(f"PR description is complaint for {body_search[1]}. Good job.")
  -
  -
  -if title_search[1] != body_search[1]:
  -    fail("PR title and description have different IDs.")
  -
  -# All good.
  -sys.exit(0)
  
verification_info: {"golden_diff": "diff --git a/.github/scripts/check-pr-text.py b/.github/scripts/check-pr-text.py\ndeleted file mode 100644\n--- a/.github/scripts/check-pr-text.py\n+++ /dev/null\n@@ -1,64 +0,0 @@\n-#\n-# This script is designed to be called by the GHA workflow.\n-#\n-# It is designed to check that the PR text complies to our dev standards.\n-#\n-# The input is received via the environmet variables:\n-# * PR_TITLE - title of the PR\n-# * PR_BODY - the description of the PR\n-#\n-# To test it run\n-#\n-# $ export PR_TITLE='#1234 Test Title'\n-# $ export PR_BODY='some lines\n-# > Fixes #12345\n-# > more lines'\n-# $ python3 .github/scripts/check-pr-text.py\n-#\n-import os\n-import re\n-import sys\n-\n-pr_title = os.environ.get(\"PR_TITLE\", \"\")\n-pr_body = os.environ.get(\"PR_BODY\", \"\")\n-\n-print(\"--- DEBUG ---\")\n-print(f\"Title: {pr_title}\")\n-print(f\"Body:\\n {pr_body}\")\n-print(\"-------------\")\n-\n-\n-def fail(message):\n-    print(message)\n-    print(\"Fix the title and then trigger a new push.\")\n-    print(\"A re-run for this job will not work.\")\n-    sys.exit(1)\n-\n-\n-if not pr_title:\n-    fail(\"Title for the PR not found. \" \"Maybe missing PR_TITLE env var.\")\n-\n-if not pr_body:\n-    fail(\"Body for the PR not found. \" \"Maybe missing PR_BODY env var.\")\n-\n-title_search = re.search(r\"^(#\\d+):? .+\", pr_title)\n-if not title_search:\n-    fail(\n-        \"Title of PR has no issue ID reference. It must look like \u201c#1234 Foo bar baz\u201d.\"\n-    )\n-else:\n-    print(f\"PR title is complaint for {title_search[1]}. Good job.\")\n-\n-\n-body_search = re.search(r\".*Fixes (#\\d+).+\", pr_body)\n-if not body_search:\n-    fail('Body of PR has no \"Fixes #12345\" issue ID reference.')\n-else:\n-    print(f\"PR description is complaint for {body_search[1]}. Good job.\")\n-\n-\n-if title_search[1] != body_search[1]:\n-    fail(\"PR title and description have different IDs.\")\n-\n-# All good.\n-sys.exit(0)\n", "issue": "Remove check for PR links to issue IDs\n        > If this is a pain there are 2 options:\r\n\r\nIt does just seem to be the most common type of misconfiguration, which I bump into on almost every code review or submission.\r\n\r\nI'm not sure it's providing enough value to be worth the hassle, so perhaps disabling would be best for now.  The \"fixes:\" line does most of the work.\r\n\r\n_Originally posted by @glyph in https://github.com/twisted/twisted/issues/11747#issuecomment-1304901054_\r\n      \n", "before_files": [{"content": "#\n# This script is designed to be called by the GHA workflow.\n#\n# It is designed to check that the PR text complies to our dev standards.\n#\n# The input is received via the environmet variables:\n# * PR_TITLE - title of the PR\n# * PR_BODY - the description of the PR\n#\n# To test it run\n#\n# $ export PR_TITLE='#1234 Test Title'\n# $ export PR_BODY='some lines\n# > Fixes #12345\n# > more lines'\n# $ python3 .github/scripts/check-pr-text.py\n#\nimport os\nimport re\nimport sys\n\npr_title = os.environ.get(\"PR_TITLE\", \"\")\npr_body = os.environ.get(\"PR_BODY\", \"\")\n\nprint(\"--- DEBUG ---\")\nprint(f\"Title: {pr_title}\")\nprint(f\"Body:\\n {pr_body}\")\nprint(\"-------------\")\n\n\ndef fail(message):\n    print(message)\n    print(\"Fix the title and then trigger a new push.\")\n    print(\"A re-run for this job will not work.\")\n    sys.exit(1)\n\n\nif not pr_title:\n    fail(\"Title for the PR not found. \" \"Maybe missing PR_TITLE env var.\")\n\nif not pr_body:\n    fail(\"Body for the PR not found. \" \"Maybe missing PR_BODY env var.\")\n\ntitle_search = re.search(r\"^(#\\d+):? .+\", pr_title)\nif not title_search:\n    fail(\n        \"Title of PR has no issue ID reference. It must look like \u201c#1234 Foo bar baz\u201d.\"\n    )\nelse:\n    print(f\"PR title is complaint for {title_search[1]}. Good job.\")\n\n\nbody_search = re.search(r\".*Fixes (#\\d+).+\", pr_body)\nif not body_search:\n    fail('Body of PR has no \"Fixes #12345\" issue ID reference.')\nelse:\n    print(f\"PR description is complaint for {body_search[1]}. Good job.\")\n\n\nif title_search[1] != body_search[1]:\n    fail(\"PR title and description have different IDs.\")\n\n# All good.\nsys.exit(0)\n", "path": ".github/scripts/check-pr-text.py"}]}