Uploaded image for project: 'Cristal'
  1. Cristal
  2. CRISTAL-622

Impossible to edit an empty Github repository

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Major
    • None
    • 0.15
    • Backend - Github
    • None
    • Unknown
    • N/A
    • N/A

    Description

      Reproduction steps

      1. create a github repository with 0 commits
      2. configuration then use the new repository with the github backend
      3. click on new page
      4. set a page name
      5. click on create

      Expected

      The page is created and the user can start edit it

      Actual

      An error message is displayed

      Technical details

      Executed request

      await fetch("https://api.github.com/repos/manuelleduc/cristaledittestpublic/contents/aaa.md", {
          "credentials": "omit",
          "headers": {
              "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0",
              "Accept": "*/*",
              "Accept-Language": "en-US,en;q=0.5",
              "Content-Type": "application/vnd.github+json",
              "Sec-GPC": "1",
              "Sec-Fetch-Dest": "empty",
              "Sec-Fetch-Mode": "cors",
              "Sec-Fetch-Site": "cross-site",
              "Priority": "u=4",
              "Pragma": "no-cache",
              "Cache-Control": "no-cache"
          },
          "body": "{\"content\":\"LS0tCm5hbWU6IGFhYQpzeW50YXg6IG1hcmtkb3duLzEuMgotLS0K\",\"message\":\"Update aaa\"}",
          "method": "PUT",
          "mode": "cors"
      });
      

      The response

      {
        "message": "Not Found",
        "documentation_url": "https://docs.github.com/rest/repos/contents#create-or-update-file-contents",
        "status": "404"
      }
      

      Attachments

        Activity

          People

            mleduc Manuel Leduc
            mleduc Manuel Leduc
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: