-
Notifications
You must be signed in to change notification settings - Fork 528
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
Update octokit/rest API calls to 16.24.3 #288
Update octokit/rest API calls to 16.24.3 #288
Conversation
This reverts commit d800786.
I'm just curious about your PR. Is this PR specific to Staticman v2? Have you tested its compatibility with v3? |
I have only tested with v2. |
As I'm using Staticman with GitLab, the v3 URL scheme is needed. However, I didn't (and won't) implement #243, so there's no need for the rollback. As a result, to test this PR, I've cherry-picked bb1a1a8 on top of 9ce2c48. This PR does solve the problem described in #299 (comment), but I get the following deprecation messages. Besides, I can't get webhooks working. I received "service timeout". The actual payload JSON is too large to be posted here. @BloggerBust-bot Have you seen such messages? Anyways thanks for great fix.
|
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.
Replace all instances of createFile
by createOrUpdateFile
due to the last Deprecation
message above.
Thank you. I may have seen a message similar to the service timeout that you describe. I ran into quite a number of issues with octokit and found that the easiest way to trouble shoot them was to test it directly in a node repl. I used code similar to what I have pasted below to work through these sorts of problems:
|
I dunno Node.JS. I deployed it to Heroku. Here's the first few lines of
|
I can look into this over the weekend. Right now I have an urgent need to complete a tag system project that I recently started. It might take me another two days to complete it. |
Your package.json says that you are using the latest version 16.x.x of the octokit rest api. Change that to "16.24.3" without a caret "^". If that solves your problem then we know it is a change in the latest API (16.28.x) since 16.24.3. Hopefully updating our usage of the API so that we are no longer calling deprecated methods will solve the issue. Learning how to use a node repl will really speed up trouble shooting this API. |
Actually, I just noticed that package-lock.json is resolving https://registry.npmjs.org/@octokit/rest/-/rest-15.9.4.tgz. This article explains package-lock.json and might help you trouble shoot version management issues. |
Thanks for reply. I've run into a similar situation. Lemme come back to this a few weeks later. |
Hi info-bot,
You will need to look into the logs to see what is happening on the server. You want to watch what the octokit/rest library is doing. That is most likely the point of failure. Are you seeing the "service timeout" error described by @VincentTam? I only tested this for version 16.24.3. You could try removing the caret symbol "^" in front of the octokit/rest version in package.json and set the version specifically to 16.24.3. package-lock.json may also need to be updated. Read comments above. Once I have time (soonish) I will help VincentTam sort it out if he has not already done so.
The app creates the branch right in your repo so that it can merge it by itself if you choose to turn off moderation. For Blogger Bust, I currently have moderation turned on because of spam, but once I have a solution in place to deal with that I would like to turn off moderation. Note, that the most efficient way to trouble shoot octokit/rest is in a node repl. |
@BloggerBust I wonder if #195 can help. |
This has been resolved in #319 so I'll be closing this PR. Your contribution was helpful when making my own similar changes. Thank you for your contribution! |
Depends on: PR #285
The octokit/rest git createReference and deleteReference functions have changed to createRef and deleteRef. Without this update staticman will respond with errorCode GITHUB_CREATING_PR when trying to process a PR.