chore(ci): correct github-script API calls#14442
Merged
diemol merged 3 commits intoSeleniumHQ:trunkfrom Aug 28, 2024
Merged
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
Contributor
PR Reviewer Guide 🔍
|
Contributor
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>
diemol
approved these changes
Aug 28, 2024
M1troll
pushed a commit
to M1troll/selenium
that referenced
this pull request
May 14, 2025
* chore(ci): correct github-script API calls 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> * fix(ci): remove 'Download' from delete-comments 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> * fix(ci): correct block user task 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> --------- Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Description
Since V5 of github-script the Octokit context available via
githubno 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.deleteCommentandblockmethods 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.deleteCommentandblockmethods to use the new Octokitcontext.