Skip to content

Commit dd7d594

Browse files
committed
Change: Update github CLI to use new pull requests API
api.pulls is deprecated and api.pull_requests should be used instead.
1 parent 446b492 commit dd7d594

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pontos/github/cmds.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ async def create_pull_request(terminal: Terminal, args: Namespace):
123123

124124
terminal.ok(f"Target branch {args.target} exists.")
125125

126-
await api.pulls.create(
126+
await api.pull_requests.create(
127127
repo=args.repo,
128128
head_branch=args.head,
129129
base_branch=args.target,
@@ -154,7 +154,7 @@ async def update_pull_request(terminal: Terminal, args: Namespace):
154154

155155
terminal.ok(f"Target branch {args.target} exists.")
156156

157-
await api.pulls.update(
157+
await api.pull_requests.update(
158158
repo=args.repo,
159159
pull_request=args.pull_request,
160160
base_branch=args.target,
@@ -172,7 +172,7 @@ async def file_status(terminal: Terminal, args: Namespace):
172172
async with GitHubAsyncRESTApi(token=args.token) as api:
173173
try:
174174
# check if PR is existing
175-
exists = await api.pulls.exists(
175+
exists = await api.pull_requests.exists(
176176
repo=args.repo, pull_request=args.pull_request
177177
)
178178
if not exists:
@@ -184,7 +184,7 @@ async def file_status(terminal: Terminal, args: Namespace):
184184

185185
terminal.ok(f"PR {args.pull_request} exists.")
186186

187-
file_dict = await api.pulls.files(
187+
file_dict = await api.pull_requests.files(
188188
repo=args.repo,
189189
pull_request=args.pull_request,
190190
status_list=args.status,
@@ -208,7 +208,7 @@ async def labels(terminal: Terminal, args: Namespace):
208208
async with GitHubAsyncRESTApi(token=args.token) as api:
209209
try:
210210
# check if PR is existing
211-
exists = await api.pulls.exists(
211+
exists = await api.pull_requests.exists(
212212
repo=args.repo, pull_request=args.issue
213213
)
214214
if not exists:

0 commit comments

Comments
 (0)