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

ASF-ui should use new /Api/WWW/GitHub/Wiki endpoints for wiki calls #1320

Closed
JustArchi opened this issue Mar 8, 2021 · 1 comment · Fixed by #1328
Closed

ASF-ui should use new /Api/WWW/GitHub/Wiki endpoints for wiki calls #1320

JustArchi opened this issue Mar 8, 2021 · 1 comment · Fixed by #1328
Assignees
Labels
🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. ✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🔴 High priority Issues marked with this label indicate the most serious problems, especially security-related.

Comments

@JustArchi
Copy link
Member

JustArchi commented Mar 8, 2021

Description

See #1319 for preface. The problematic code lies in fetchWiki.js

ASF includes two new internal API endpoints as replacement for removal of /Api/WWW/Send:

image

Expected behavior

For fetching history, /Api/WWW/GitHub/Wiki/History/Setting-up:

{
  "Result": {
    "b08d6e69d5fba278db7b0bd56a4e238411dcd22e": "2019-12-05T16:43:02Z",
    "7ccc39f95cc6eaddf64497eea5b9b2959c5da318": "2020-03-06T23:24:53Z",
    "678c4fd13f4a24c1cd9e38a9eac61826fc3f1bb0": "2019-09-12T12:32:08Z",
    ...
    "2c44661fcbf2617fe2db8301ad299f5037949faf": "2020-11-12T13:46:30Z",
    "728cc49cf8c5c3baef0b8cd43e7e6f1237f8bd97": "2020-09-01T09:57:50Z",
    "931566731788f1a3f6ddc103e999f737e2dec846": "2020-11-12T13:46:52Z"
  },
  "Message": "OK",
  "Success": true
}

ASF-ui is expected to sort this output by dates, if appropriate.


For fetching specific pages, /Api/WWW/GitHub/Wiki/Page/Setting-up, accepts also optional ?revision= query argument.

{
  "Result": "<h1>\n<a id=\"user-content-setting-up\" class=\"anchor\" href=\"#setting-up\" aria-hidden=\"true\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path fill-rule=\"evenodd\" d=\"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\"></path></svg></a>Setting up</h1>\n<p>If you arrived here for the first time, welcome! We're very happy to see yet another traveler that is interested in our project, ...</p>",
  "Message": "OK",
  "Success": true
}

Current behavior

ASF-ui uses now-deprecated /Api/WWW/Send for that functionality. This will stop functioning in approx. 60 days from now.

@JustArchi JustArchi added 🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. ✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🔴 High priority Issues marked with this label indicate the most serious problems, especially security-related. Security labels Mar 8, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. ✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🔴 High priority Issues marked with this label indicate the most serious problems, especially security-related.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants