Closed jerone closed 8 years ago
This issue still happens when I press the "Report Issue" button on a deprecation in the deprecation's cop pane.
The following message appeared in the console:
Failed to load resource: the server responded with a status of 422 (Unprocessable Entity)
https://api.github.com/search/issues?q=Object.TextEditor%20is%20deprecated.%20repo:git+mark-hahn/markdown-scroll-sync&sort=created
When opening above url it will print the following message:
{
"message": "Validation Failed",
"errors": [
{
"message": "The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.",
"resource": "Search",
"field": "q",
"code": "invalid"
}
],
"documentation_url": "https://developer.github.com/v3/search/"
}
Hope that helps a little bit.
I had the same issue as @jerone. The issue seems to be from the regular expression on deprecation-cop-view.coffee:84:
repo = repoUrl.replace /http(s)?:\/\/(\d+\.)?github.com\//gi, ''
works on some packages, but not for others with a ^git+
prefix (cherrypicked examples from atom.packages.getActivePackages()[*].metadata.repository
...
{"type": "git", "url": "git+https://github.com/ben/autoflow-diffable.git"}
{"type": "git", "url": "https://github.com/atom/atom-dark-syntax.git"}
which results in malformed URLs that are visible in the search api request above.
with a
^git+
prefix
I can confirm this. When removing git+
from the url I get a valid response back from the server:
-https://api.github.com/search/issues?q=Object.TextEditor%20is%20deprecated.%20repo:git+mark-hahn/markdown-scroll-sync&sort=created
+https://api.github.com/search/issues?q=Object.TextEditor%20is%20deprecated.%20repo:mark-hahn/markdown-scroll-sync&sort=created
Something similar was done for the settings-view package: https://github.com/atom/settings-view/pull/512
Thanks for the report. This is now fixed on master via a fix to package repository URL normalization in the package manager.
[Enter steps to reproduce below:]
Atom Version: 1.5.0-beta2 System: Microsoft Windows 7 Home Premium Thrown From: deprecation-cop package, v0.54.0
Stack Trace
Uncaught TypeError: Error processing argument -1.
Commands
Config
Installed Packages