We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Rename merge queue files for consistency
### Short Summary:
Refactor merge request table such that there is more parity between the JS and HTML files.

### Background:
Names of files related to the librarian merge queue have become inconsistent over time:

#### Current file names
| Component | JS filename | HTML filename | LESS filename |
|--------|--------|--------|--------|
| Table header | merge-request-table/LibrarianQueue/TableHeader.js | `None` | components/merge-request-table.less |
| Table row | merge-request-table/LibrarianQueue/TableRow.js | `None`| components/merge-request-table.less |
| Base component (the whole table) | merge-request-table/LibrarianQueue.js | merge_queue/merge_queue.html | components/merge-request-table.less | 

I figure that the naming conventions for the JS and LESS files are in alignment, and no changes are required.  Our HTML template tile,,however, has an entirely different name, and would be difficult to find by a new developer (at least not without the help of somebody who is familiar with this code).  It's also kind of odd that there is a JS file for each component, but only one template file.

### Main Requirements:
1. Create two new template files: one for the table header, and one for a single table row.  Move existing header and table row HTML into their respective, newly created files.
2. Ensure that the following filepaths are used:

#### Updated file names
| Component | JS filename | HTML filename |
|--------|--------|--------|
| Table header | merge-request-table/MergeRequestTable/TableHeader.js | merge_request_table/table_header.html |
| Table row | merge-request-table/MergeRequestTable/TableRow.js | merge_request_table/table_row.html |
| Base component (the whole table) | merge-request-table/MergeRequestTable.js | merge_request_table/merge_request_table.html |

### Checklist:
- [ ] JS filepaths have been updated as per the above "Updated file names" table.
  - [ ] All references to these files have been updated.
- [ ] New templates have been created
  - [ ] table_header.html
  - [ ] table_row.html
- [ ] Existing merge_queue/merge_queue.html template has been updated:
  - [ ] Change filepath to merge_request_table/merge_request_table.html
  - [ ] Replace header and table row code with references to the new templates
- [ ] Update all references to the merge table template file

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `openlibrary/plugins/upstream/edits.py`
Content:
```
1 """Librarian Edits
2 """
3 
4 import json
5 import web
6 
7 from openlibrary import accounts
8 from openlibrary.core.edits import CommunityEditsQueue, get_status_for_view
9 from infogami.utils import delegate
10 from infogami.utils.view import render_template
11 
12 
13 def response(status='ok', **kwargs):
14     return {'status': status, **kwargs}
15 
16 
17 def process_merge_request(rtype, data):
18     user = accounts.get_current_user()
19     username = user['key'].split('/')[-1]
20     # Request types can be: create-request, update-request
21     if rtype == 'create-request':
22         resp = community_edits_queue.create_request(username, **data)
23     elif rtype == 'update-request':
24         resp = community_edits_queue.update_request(username, **data)
25     else:
26         resp = response(status='error', error='Unknown request type')
27     return resp
28 
29 
30 class community_edits_queue(delegate.page):
31     path = '/merges'
32 
33     def GET(self):
34         i = web.input(
35             page=1,
36             limit=25,
37             mode="open",
38             submitter=None,
39             reviewer=None,
40             order='desc',
41             status=None,
42         )
43         merge_requests = CommunityEditsQueue.get_requests(
44             page=int(i.page),
45             limit=int(i.limit),
46             mode=i.mode,
47             submitter=i.submitter,
48             reviewer=i.reviewer,
49             order=f'updated {i.order}',
50             status=i.status,
51         ).list()
52 
53         total_found = {
54             "open": CommunityEditsQueue.get_counts_by_mode(
55                 mode='open', submitter=i.submitter, reviewer=i.reviewer
56             ),
57             "closed": CommunityEditsQueue.get_counts_by_mode(
58                 mode='closed', submitter=i.submitter, reviewer=i.reviewer
59             ),
60             "submitters": CommunityEditsQueue.get_submitters(),
61             "reviewers": CommunityEditsQueue.get_reviewers(),
62         }
63 
64         librarians = {
65             'submitters': CommunityEditsQueue.get_submitters(),
66             'reviewers': CommunityEditsQueue.get_reviewers(),
67         }
68 
69         return render_template(
70             'merge_queue/merge_queue',
71             total_found,
72             librarians,
73             merge_requests=merge_requests,
74         )
75 
76     def POST(self):
77         data = json.loads(web.data())
78         resp = process_merge_request(data.pop('rtype', ''), data)
79 
80         return delegate.RawText(json.dumps(resp), content_type='application/json')
81 
82     @staticmethod
83     def create_request(
84         username,
85         action='',
86         mr_type=None,
87         olids='',
88         comment: str | None = None,
89         primary: str | None = None,
90     ):
91         def is_valid_action(action):
92             return action in ('create-pending', 'create-merged')
93 
94         def needs_unique_url(mr_type):
95             return mr_type in (
96                 CommunityEditsQueue.TYPE['WORK_MERGE'],
97                 CommunityEditsQueue.TYPE['AUTHOR_MERGE'],
98             )
99 
100         if is_valid_action(action):
101             olid_list = olids.split(',')
102 
103             title = community_edits_queue.create_title(mr_type, olid_list)
104             url = community_edits_queue.create_url(mr_type, olid_list, primary=primary)
105 
106             # Validate URL
107             is_valid_url = True
108             if needs_unique_url(mr_type) and CommunityEditsQueue.exists(url):
109                 is_valid_url = False
110 
111             if is_valid_url:
112                 if action == 'create-pending':
113                     result = CommunityEditsQueue.submit_request(
114                         url, username, title=title, comment=comment, mr_type=mr_type
115                     )
116                 elif action == 'create-merged':
117                     result = CommunityEditsQueue.submit_request(
118                         url,
119                         username,
120                         title=title,
121                         comment=comment,
122                         reviewer=username,
123                         status=CommunityEditsQueue.STATUS['MERGED'],
124                         mr_type=mr_type,
125                     )
126                 resp = (
127                     response(id=result)
128                     if result
129                     else response(status='error', error='Request creation failed.')
130                 )
131             else:
132                 resp = response(
133                     status='error',
134                     error='A merge request for these items already exists.',
135                 )
136         else:
137             resp = response(
138                 status='error',
139                 error=f'Action "{action}" is invalid for this request type.',
140             )
141 
142         return resp
143 
144     @staticmethod
145     def update_request(username, action='', mrid=None, comment=None):
146         # Comment on existing request:
147         if action == 'comment':
148             if comment:
149                 CommunityEditsQueue.comment_request(mrid, username, comment)
150                 resp = response()
151             else:
152                 resp = response(status='error', error='No comment sent in request.')
153         # Assign to existing request:
154         elif action == 'claim':
155             result = CommunityEditsQueue.assign_request(mrid, username)
156             resp = response(**result)
157         # Unassign from existing request:
158         elif action == 'unassign':
159             CommunityEditsQueue.unassign_request(mrid)
160             status = get_status_for_view(CommunityEditsQueue.STATUS['PENDING'])
161             resp = response(newStatus=status)
162         # Close request by approving:
163         elif action == 'approve':
164             CommunityEditsQueue.update_request_status(
165                 mrid, CommunityEditsQueue.STATUS['MERGED'], username, comment=comment
166             )
167             resp = response()
168         # Close request by declining:
169         elif action == 'decline':
170             CommunityEditsQueue.update_request_status(
171                 mrid, CommunityEditsQueue.STATUS['DECLINED'], username, comment=comment
172             )
173             resp = response()
174         # Unknown request:
175         else:
176             resp = response(
177                 status='error',
178                 error=f'Action "{action}" is invalid for this request type.',
179             )
180 
181         return resp
182 
183     @staticmethod
184     def create_url(mr_type: int, olids: list[str], primary: str | None = None) -> str:
185         if mr_type == CommunityEditsQueue.TYPE['WORK_MERGE']:
186             primary_param = f'&primary={primary}' if primary else ''
187             return f'/works/merge?records={",".join(olids)}{primary_param}'
188         elif mr_type == CommunityEditsQueue.TYPE['AUTHOR_MERGE']:
189             return f'/authors/merge?key={"&key=".join(olids)}'
190         return ''
191 
192     @staticmethod
193     def create_title(mr_type: int, olids: list[str]) -> str:
194         if mr_type == CommunityEditsQueue.TYPE['WORK_MERGE']:
195             for olid in olids:
196                 book = web.ctx.site.get(f'/works/{olid}')
197                 if book and book.title:
198                     return book.title
199         elif mr_type == CommunityEditsQueue.TYPE['AUTHOR_MERGE']:
200             for olid in olids:
201                 author = web.ctx.site.get(f'/authors/{olid}')
202                 if author and author.name:
203                     return author.name
204         return 'Unknown record'
205 
206 
207 def setup():
208     pass
209
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/openlibrary/plugins/upstream/edits.py b/openlibrary/plugins/upstream/edits.py
--- a/openlibrary/plugins/upstream/edits.py
+++ b/openlibrary/plugins/upstream/edits.py
@@ -67,7 +67,7 @@
         }
 
         return render_template(
-            'merge_queue/merge_queue',
+            'merge_request_table/merge_request_table',
             total_found,
             librarians,
             merge_requests=merge_requests,

{"golden_diff": "diff --git a/openlibrary/plugins/upstream/edits.py b/openlibrary/plugins/upstream/edits.py\n--- a/openlibrary/plugins/upstream/edits.py\n+++ b/openlibrary/plugins/upstream/edits.py\n@@ -67,7 +67,7 @@\n         }\n \n         return render_template(\n-            'merge_queue/merge_queue',\n+            'merge_request_table/merge_request_table',\n             total_found,\n             librarians,\n             merge_requests=merge_requests,\n", "issue": "Rename merge queue files for consistency\n### Short Summary:\r\nRefactor merge request table such that there is more parity between the JS and HTML files.\r\n\r\n### Background:\r\nNames of files related to the librarian merge queue have become inconsistent over time:\r\n\r\n#### Current file names\r\n| Component | JS filename | HTML filename | LESS filename |\r\n|--------|--------|--------|--------|\r\n| Table header | merge-request-table/LibrarianQueue/TableHeader.js | `None` | components/merge-request-table.less |\r\n| Table row | merge-request-table/LibrarianQueue/TableRow.js | `None`| components/merge-request-table.less |\r\n| Base component (the whole table) | merge-request-table/LibrarianQueue.js | merge_queue/merge_queue.html | components/merge-request-table.less | \r\n\r\nI figure that the naming conventions for the JS and LESS files are in alignment, and no changes are required.  Our HTML template tile,,however, has an entirely different name, and would be difficult to find by a new developer (at least not without the help of somebody who is familiar with this code).  It's also kind of odd that there is a JS file for each component, but only one template file.\r\n\r\n### Main Requirements:\r\n1. Create two new template files: one for the table header, and one for a single table row.  Move existing header and table row HTML into their respective, newly created files.\r\n2. Ensure that the following filepaths are used:\r\n\r\n#### Updated file names\r\n| Component | JS filename | HTML filename |\r\n|--------|--------|--------|\r\n| Table header | merge-request-table/MergeRequestTable/TableHeader.js | merge_request_table/table_header.html |\r\n| Table row | merge-request-table/MergeRequestTable/TableRow.js | merge_request_table/table_row.html |\r\n| Base component (the whole table) | merge-request-table/MergeRequestTable.js | merge_request_table/merge_request_table.html |\r\n\r\n### Checklist:\r\n- [ ] JS filepaths have been updated as per the above \"Updated file names\" table.\r\n  - [ ] All references to these files have been updated.\r\n- [ ] New templates have been created\r\n  - [ ] table_header.html\r\n  - [ ] table_row.html\r\n- [ ] Existing merge_queue/merge_queue.html template has been updated:\r\n  - [ ] Change filepath to merge_request_table/merge_request_table.html\r\n  - [ ] Replace header and table row code with references to the new templates\r\n- [ ] Update all references to the merge table template file\n", "before_files": [{"content": "\"\"\"Librarian Edits\n\"\"\"\n\nimport json\nimport web\n\nfrom openlibrary import accounts\nfrom openlibrary.core.edits import CommunityEditsQueue, get_status_for_view\nfrom infogami.utils import delegate\nfrom infogami.utils.view import render_template\n\n\ndef response(status='ok', **kwargs):\n    return {'status': status, **kwargs}\n\n\ndef process_merge_request(rtype, data):\n    user = accounts.get_current_user()\n    username = user['key'].split('/')[-1]\n    # Request types can be: create-request, update-request\n    if rtype == 'create-request':\n        resp = community_edits_queue.create_request(username, **data)\n    elif rtype == 'update-request':\n        resp = community_edits_queue.update_request(username, **data)\n    else:\n        resp = response(status='error', error='Unknown request type')\n    return resp\n\n\nclass community_edits_queue(delegate.page):\n    path = '/merges'\n\n    def GET(self):\n        i = web.input(\n            page=1,\n            limit=25,\n            mode=\"open\",\n            submitter=None,\n            reviewer=None,\n            order='desc',\n            status=None,\n        )\n        merge_requests = CommunityEditsQueue.get_requests(\n            page=int(i.page),\n            limit=int(i.limit),\n            mode=i.mode,\n            submitter=i.submitter,\n            reviewer=i.reviewer,\n            order=f'updated {i.order}',\n            status=i.status,\n        ).list()\n\n        total_found = {\n            \"open\": CommunityEditsQueue.get_counts_by_mode(\n                mode='open', submitter=i.submitter, reviewer=i.reviewer\n            ),\n            \"closed\": CommunityEditsQueue.get_counts_by_mode(\n                mode='closed', submitter=i.submitter, reviewer=i.reviewer\n            ),\n            \"submitters\": CommunityEditsQueue.get_submitters(),\n            \"reviewers\": CommunityEditsQueue.get_reviewers(),\n        }\n\n        librarians = {\n            'submitters': CommunityEditsQueue.get_submitters(),\n            'reviewers': CommunityEditsQueue.get_reviewers(),\n        }\n\n        return render_template(\n            'merge_queue/merge_queue',\n            total_found,\n            librarians,\n            merge_requests=merge_requests,\n        )\n\n    def POST(self):\n        data = json.loads(web.data())\n        resp = process_merge_request(data.pop('rtype', ''), data)\n\n        return delegate.RawText(json.dumps(resp), content_type='application/json')\n\n    @staticmethod\n    def create_request(\n        username,\n        action='',\n        mr_type=None,\n        olids='',\n        comment: str | None = None,\n        primary: str | None = None,\n    ):\n        def is_valid_action(action):\n            return action in ('create-pending', 'create-merged')\n\n        def needs_unique_url(mr_type):\n            return mr_type in (\n                CommunityEditsQueue.TYPE['WORK_MERGE'],\n                CommunityEditsQueue.TYPE['AUTHOR_MERGE'],\n            )\n\n        if is_valid_action(action):\n            olid_list = olids.split(',')\n\n            title = community_edits_queue.create_title(mr_type, olid_list)\n            url = community_edits_queue.create_url(mr_type, olid_list, primary=primary)\n\n            # Validate URL\n            is_valid_url = True\n            if needs_unique_url(mr_type) and CommunityEditsQueue.exists(url):\n                is_valid_url = False\n\n            if is_valid_url:\n                if action == 'create-pending':\n                    result = CommunityEditsQueue.submit_request(\n                        url, username, title=title, comment=comment, mr_type=mr_type\n                    )\n                elif action == 'create-merged':\n                    result = CommunityEditsQueue.submit_request(\n                        url,\n                        username,\n                        title=title,\n                        comment=comment,\n                        reviewer=username,\n                        status=CommunityEditsQueue.STATUS['MERGED'],\n                        mr_type=mr_type,\n                    )\n                resp = (\n                    response(id=result)\n                    if result\n                    else response(status='error', error='Request creation failed.')\n                )\n            else:\n                resp = response(\n                    status='error',\n                    error='A merge request for these items already exists.',\n                )\n        else:\n            resp = response(\n                status='error',\n                error=f'Action \"{action}\" is invalid for this request type.',\n            )\n\n        return resp\n\n    @staticmethod\n    def update_request(username, action='', mrid=None, comment=None):\n        # Comment on existing request:\n        if action == 'comment':\n            if comment:\n                CommunityEditsQueue.comment_request(mrid, username, comment)\n                resp = response()\n            else:\n                resp = response(status='error', error='No comment sent in request.')\n        # Assign to existing request:\n        elif action == 'claim':\n            result = CommunityEditsQueue.assign_request(mrid, username)\n            resp = response(**result)\n        # Unassign from existing request:\n        elif action == 'unassign':\n            CommunityEditsQueue.unassign_request(mrid)\n            status = get_status_for_view(CommunityEditsQueue.STATUS['PENDING'])\n            resp = response(newStatus=status)\n        # Close request by approving:\n        elif action == 'approve':\n            CommunityEditsQueue.update_request_status(\n                mrid, CommunityEditsQueue.STATUS['MERGED'], username, comment=comment\n            )\n            resp = response()\n        # Close request by declining:\n        elif action == 'decline':\n            CommunityEditsQueue.update_request_status(\n                mrid, CommunityEditsQueue.STATUS['DECLINED'], username, comment=comment\n            )\n            resp = response()\n        # Unknown request:\n        else:\n            resp = response(\n                status='error',\n                error=f'Action \"{action}\" is invalid for this request type.',\n            )\n\n        return resp\n\n    @staticmethod\n    def create_url(mr_type: int, olids: list[str], primary: str | None = None) -> str:\n        if mr_type == CommunityEditsQueue.TYPE['WORK_MERGE']:\n            primary_param = f'&primary={primary}' if primary else ''\n            return f'/works/merge?records={\",\".join(olids)}{primary_param}'\n        elif mr_type == CommunityEditsQueue.TYPE['AUTHOR_MERGE']:\n            return f'/authors/merge?key={\"&key=\".join(olids)}'\n        return ''\n\n    @staticmethod\n    def create_title(mr_type: int, olids: list[str]) -> str:\n        if mr_type == CommunityEditsQueue.TYPE['WORK_MERGE']:\n            for olid in olids:\n                book = web.ctx.site.get(f'/works/{olid}')\n                if book and book.title:\n                    return book.title\n        elif mr_type == CommunityEditsQueue.TYPE['AUTHOR_MERGE']:\n            for olid in olids:\n                author = web.ctx.site.get(f'/authors/{olid}')\n                if author and author.name:\n                    return author.name\n        return 'Unknown record'\n\n\ndef setup():\n    pass\n", "path": "openlibrary/plugins/upstream/edits.py"}], "after_files": [{"content": "\"\"\"Librarian Edits\n\"\"\"\n\nimport json\nimport web\n\nfrom openlibrary import accounts\nfrom openlibrary.core.edits import CommunityEditsQueue, get_status_for_view\nfrom infogami.utils import delegate\nfrom infogami.utils.view import render_template\n\n\ndef response(status='ok', **kwargs):\n    return {'status': status, **kwargs}\n\n\ndef process_merge_request(rtype, data):\n    user = accounts.get_current_user()\n    username = user['key'].split('/')[-1]\n    # Request types can be: create-request, update-request\n    if rtype == 'create-request':\n        resp = community_edits_queue.create_request(username, **data)\n    elif rtype == 'update-request':\n        resp = community_edits_queue.update_request(username, **data)\n    else:\n        resp = response(status='error', error='Unknown request type')\n    return resp\n\n\nclass community_edits_queue(delegate.page):\n    path = '/merges'\n\n    def GET(self):\n        i = web.input(\n            page=1,\n            limit=25,\n            mode=\"open\",\n            submitter=None,\n            reviewer=None,\n            order='desc',\n            status=None,\n        )\n        merge_requests = CommunityEditsQueue.get_requests(\n            page=int(i.page),\n            limit=int(i.limit),\n            mode=i.mode,\n            submitter=i.submitter,\n            reviewer=i.reviewer,\n            order=f'updated {i.order}',\n            status=i.status,\n        ).list()\n\n        total_found = {\n            \"open\": CommunityEditsQueue.get_counts_by_mode(\n                mode='open', submitter=i.submitter, reviewer=i.reviewer\n            ),\n            \"closed\": CommunityEditsQueue.get_counts_by_mode(\n                mode='closed', submitter=i.submitter, reviewer=i.reviewer\n            ),\n            \"submitters\": CommunityEditsQueue.get_submitters(),\n            \"reviewers\": CommunityEditsQueue.get_reviewers(),\n        }\n\n        librarians = {\n            'submitters': CommunityEditsQueue.get_submitters(),\n            'reviewers': CommunityEditsQueue.get_reviewers(),\n        }\n\n        return render_template(\n            'merge_request_table/merge_request_table',\n            total_found,\n            librarians,\n            merge_requests=merge_requests,\n        )\n\n    def POST(self):\n        data = json.loads(web.data())\n        resp = process_merge_request(data.pop('rtype', ''), data)\n\n        return delegate.RawText(json.dumps(resp), content_type='application/json')\n\n    @staticmethod\n    def create_request(\n        username,\n        action='',\n        mr_type=None,\n        olids='',\n        comment: str | None = None,\n        primary: str | None = None,\n    ):\n        def is_valid_action(action):\n            return action in ('create-pending', 'create-merged')\n\n        def needs_unique_url(mr_type):\n            return mr_type in (\n                CommunityEditsQueue.TYPE['WORK_MERGE'],\n                CommunityEditsQueue.TYPE['AUTHOR_MERGE'],\n            )\n\n        if is_valid_action(action):\n            olid_list = olids.split(',')\n\n            title = community_edits_queue.create_title(mr_type, olid_list)\n            url = community_edits_queue.create_url(mr_type, olid_list, primary=primary)\n\n            # Validate URL\n            is_valid_url = True\n            if needs_unique_url(mr_type) and CommunityEditsQueue.exists(url):\n                is_valid_url = False\n\n            if is_valid_url:\n                if action == 'create-pending':\n                    result = CommunityEditsQueue.submit_request(\n                        url, username, title=title, comment=comment, mr_type=mr_type\n                    )\n                elif action == 'create-merged':\n                    result = CommunityEditsQueue.submit_request(\n                        url,\n                        username,\n                        title=title,\n                        comment=comment,\n                        reviewer=username,\n                        status=CommunityEditsQueue.STATUS['MERGED'],\n                        mr_type=mr_type,\n                    )\n                resp = (\n                    response(id=result)\n                    if result\n                    else response(status='error', error='Request creation failed.')\n                )\n            else:\n                resp = response(\n                    status='error',\n                    error='A merge request for these items already exists.',\n                )\n        else:\n            resp = response(\n                status='error',\n                error=f'Action \"{action}\" is invalid for this request type.',\n            )\n\n        return resp\n\n    @staticmethod\n    def update_request(username, action='', mrid=None, comment=None):\n        # Comment on existing request:\n        if action == 'comment':\n            if comment:\n                CommunityEditsQueue.comment_request(mrid, username, comment)\n                resp = response()\n            else:\n                resp = response(status='error', error='No comment sent in request.')\n        # Assign to existing request:\n        elif action == 'claim':\n            result = CommunityEditsQueue.assign_request(mrid, username)\n            resp = response(**result)\n        # Unassign from existing request:\n        elif action == 'unassign':\n            CommunityEditsQueue.unassign_request(mrid)\n            status = get_status_for_view(CommunityEditsQueue.STATUS['PENDING'])\n            resp = response(newStatus=status)\n        # Close request by approving:\n        elif action == 'approve':\n            CommunityEditsQueue.update_request_status(\n                mrid, CommunityEditsQueue.STATUS['MERGED'], username, comment=comment\n            )\n            resp = response()\n        # Close request by declining:\n        elif action == 'decline':\n            CommunityEditsQueue.update_request_status(\n                mrid, CommunityEditsQueue.STATUS['DECLINED'], username, comment=comment\n            )\n            resp = response()\n        # Unknown request:\n        else:\n            resp = response(\n                status='error',\n                error=f'Action \"{action}\" is invalid for this request type.',\n            )\n\n        return resp\n\n    @staticmethod\n    def create_url(mr_type: int, olids: list[str], primary: str | None = None) -> str:\n        if mr_type == CommunityEditsQueue.TYPE['WORK_MERGE']:\n            primary_param = f'&primary={primary}' if primary else ''\n            return f'/works/merge?records={\",\".join(olids)}{primary_param}'\n        elif mr_type == CommunityEditsQueue.TYPE['AUTHOR_MERGE']:\n            return f'/authors/merge?key={\"&key=\".join(olids)}'\n        return ''\n\n    @staticmethod\n    def create_title(mr_type: int, olids: list[str]) -> str:\n        if mr_type == CommunityEditsQueue.TYPE['WORK_MERGE']:\n            for olid in olids:\n                book = web.ctx.site.get(f'/works/{olid}')\n                if book and book.title:\n                    return book.title\n        elif mr_type == CommunityEditsQueue.TYPE['AUTHOR_MERGE']:\n            for olid in olids:\n                author = web.ctx.site.get(f'/authors/{olid}')\n                if author and author.name:\n                    return author.name\n        return 'Unknown record'\n\n\ndef setup():\n    pass\n", "path": "openlibrary/plugins/upstream/edits.py"}]}