Skip to content
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

[Bug] Can't post comment #29

Open
VincentTam opened this issue Jul 12, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@VincentTam
Copy link

commented Jul 12, 2019

Tried posting a comment. Received a 403 error from the offical Staticman instance. It has been reported that @staticmanapp no longer works in eduardoboucas/staticman#296 (comment).

{
  "JSON": {
    "success": false,
    "rawError": {
      "name": "HttpError",
      "status": 403,
      "headers": {
        "access-control-allow-origin": "*",
        "access-control-expose-headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
        "connection": "close",
        "content-encoding": "gzip",
        "content-security-policy": "default-src 'none'",
        "content-type": "application/json; charset=utf-8",
        "date": "Fri, 12 Jul 2019 20:25:28 GMT",
        "referrer-policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
        "server": "GitHub.com",
        "status": "403 Forbidden",
        "strict-transport-security": "max-age=31536000; includeSubdomains; preload",
        "transfer-encoding": "chunked",
        "x-accepted-oauth-scopes": "repo",
        "x-content-type-options": "nosniff",
        "x-frame-options": "deny",
        "x-github-media-type": "github.v3; format=json",
        "x-github-request-id": "D3FC:402B9:35030C2:4175B2B:5D28ECB7",
        "x-oauth-scopes": "repo",
        "x-ratelimit-limit": "60",
        "x-ratelimit-remaining": "0",
        "x-ratelimit-reset": "1562966728",
        "x-xss-protection": "1; mode=block"
      },
      "request": {
        "method": "GET",
        "url": "https://api.github.com/repos/sammcoe/samuelcoe.com/contents/staticman.yml?ref=master",
        "headers": {
          "accept": "application/vnd.github.v3+json",
          "user-agent": "Staticman agent octokit.js/16.8.0 Node.js/11.12.0 (Linux 4.4; x64)",
          "authorization": "token fbb9e50e161f8f0286d01714050f45416e6f9c1c"
        },
        "request": {
          "timeout": 5000,
          "validate": {
            "owner": {
              "required": true,
              "type": "string"
            },
            "path": {
              "required": true,
              "type": "string"
            },
            "ref": {
              "type": "string"
            },
            "repo": {
              "required": true,
              "type": "string"
            }
          }
        }
      },
      "documentation_url": "https://developer.github.com/v3/#rate-limiting",
      "_smErrorCode": "GITHUB_READING_FILE"
    },
    "errorCode": "GITHUB_READING_FILE"
  },
  "Response payload": {
    "EDITOR_CONFIG": {
      "text": "{\"success\":false,\"rawError\":{\"name\":\"HttpError\",\"status\":403,\"headers\":{\"access-control-allow-origin\":\"*\",\"access-control-expose-headers\":\"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type\",\"connection\":\"close\",\"content-encoding\":\"gzip\",\"content-security-policy\":\"default-src 'none'\",\"content-type\":\"application/json; charset=utf-8\",\"date\":\"Fri, 12 Jul 2019 20:25:28 GMT\",\"referrer-policy\":\"origin-when-cross-origin, strict-origin-when-cross-origin\",\"server\":\"GitHub.com\",\"status\":\"403 Forbidden\",\"strict-transport-security\":\"max-age=31536000; includeSubdomains; preload\",\"transfer-encoding\":\"chunked\",\"x-accepted-oauth-scopes\":\"repo\",\"x-content-type-options\":\"nosniff\",\"x-frame-options\":\"deny\",\"x-github-media-type\":\"github.v3; format=json\",\"x-github-request-id\":\"D3FC:402B9:35030C2:4175B2B:5D28ECB7\",\"x-oauth-scopes\":\"repo\",\"x-ratelimit-limit\":\"60\",\"x-ratelimit-remaining\":\"0\",\"x-ratelimit-reset\":\"1562966728\",\"x-xss-protection\":\"1; mode=block\"},\"request\":{\"method\":\"GET\",\"url\":\"https://api.github.com/repos/sammcoe/samuelcoe.com/contents/staticman.yml?ref=master\",\"headers\":{\"accept\":\"application/vnd.github.v3+json\",\"user-agent\":\"Staticman agent octokit.js/16.8.0 Node.js/11.12.0 (Linux 4.4; x64)\",\"authorization\":\"token fbb9e50e161f8f0286d01714050f45416e6f9c1c\"},\"request\":{\"timeout\":5000,\"validate\":{\"owner\":{\"required\":true,\"type\":\"string\"},\"path\":{\"required\":true,\"type\":\"string\"},\"ref\":{\"type\":\"string\"},\"repo\":{\"required\":true,\"type\":\"string\"}}}},\"documentation_url\":\"https://developer.github.com/v3/#rate-limiting\",\"_smErrorCode\":\"GITHUB_READING_FILE\"},\"errorCode\":\"GITHUB_READING_FILE\"}",
      "mode": "application/json"
    }
  }
}

Screenshot from 2019-07-12 22-28-47

@sammcoe

This comment has been minimized.

Copy link
Owner

commented Jul 12, 2019

Wow, that's unfortunate, but I guess that's the risk I was running. I really appreciate you pointing this out to me @VincentTam !

@VincentTam

This comment has been minimized.

Copy link
Author

commented Jul 12, 2019

Nonetheless, you've the right choice of technology: static comments. I can't agree more with what you've written about the upside of Staticman in this article. The current official Staticman instance doesn't work for v2. You may either

  1. choose official Staticman instance v3, or
  2. choose alternative API instance

P.S. I've chosen the 2nd option and I've built @staticmanlab, a public Staticman instance for GitLab, due to the possibility to tweak the API instance, like support from multilined message in eduardoboucas/staticman#301.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.