-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(ci): correct github-script API calls #14442
Conversation
Since V5 of github-script the Octokit context available via `github` no longer has REST methods directly on it, they were moved to `github.rest.*` instead. Update the references in delete-comments.yml job to match. Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
5e3f8a0
to
d412c2a
Compare
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
This is too generic a word and frequently matches against comments that don't need to be deleted, nor should the user be blocked as the current workflow will do. Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
The existing code was calling the individual "block a user" REST endpoint with incorrect parameters and never would have worked. Update it to (presumably achieve the desired outcome) block the user from the owning organisation instead. Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @dnwe!
User description
Description
Since V5 of github-script the Octokit context available via
github
no longer has REST methods directly on it, they were moved togithub.rest.*
instead. Update the references in delete-comments.yml job to match.Motivation and Context
The GitHub Actions workflow will fail when it attempts to delete a comment without this change.
Types of changes
Checklist
PR Type
Bug fix, Enhancement
Description
github.rest.*
syntax for API calls, ensuring compatibility with version 5 ofgithub-script
.deleteComment
andblock
methods to align with the updated Octokit context, preventing workflow failures.Changes walkthrough 📝
delete-comments.yml
Update GitHub API calls to new Octokit syntax
.github/workflows/delete-comments.yml
github.rest.*
syntax.deleteComment
andblock
methods to use the new Octokitcontext.