-
Notifications
You must be signed in to change notification settings - Fork 70
Description
I'm having issues with the ghapi 0.1.17 version released on May, 24th.
I have a private project where I use ghapi to automatically label PRs and issues based on the path of the files mentioned or modified, and the title of the PR/issue. I am using the following public project to test the workflows and scripts:
https://github.com/jhlegarreta/labelertest
The labeler on the PR/issue title was working fine with ghapi 0.1.16, but it is systematically returning an HTTP Error 422: Unprocessable Entity error for the following call:
api.issues.add_labels(
accept="application/vnd.github.v3+json",
issue_number=pull_request.number, labels=title_labels_to_add)
where the issue_number and labels have the appropriate values.
Here is an example of a successful call using 0.1.16:
https://github.com/jhlegarreta/labelertest/runs/2750092407?check_suite_focus=true#step:5:495
And here is an example of a successful call using 0.1.17:
https://github.com/jhlegarreta/labelertest/runs/2750038846?check_suite_focus=true#step:5:505
for the same contents from the viewpoint of the files added in the PRs and their titles.
I have not found any release notes notifying about changes, or an older version of the documentation. According to the latest documentation:
https://docs.github.com/en/rest/reference/issues#add-labels-to-an-issue
I would be providing the expected parameters to the call.
For what is worth, the 0.1.16 was also working when I only had:
api.issues.add_labels(pull_request.number, title_labels_to_add)
but 0.1.17 failed as described, so the parameters seem not to be the problem.
The relevant GitHub workflow file is https://github.com/jhlegarreta/labelertest/blob/main/.github/workflows/pr_title_labeler.yml, and the Python script containing the calls to the ghapi is https://github.com/jhlegarreta/labelertest/blob/main/.github/scripts/pr_title_regex_labeler.py
Would you please be able to tell what I am doing wrong.
Thanks for providing us with this valuable tool and thanks for the support.