alfred-awesome-lists
alfred-awesome-lists copied to clipboard
Edit Awesome List
There are some repositories that host readme.md
instead of README.md
which results in Page not found
error on Github.
For example https://github.com/sindresorhus/awesome-nodejs/edit/master/README.md which should be https://github.com/sindresorhus/awesome-nodejs/edit/master/readme.md
Maybe a query could be done beforehand to verify that this file exists?
Maybe a query could be done beforehand to verify that this file exists?
I was thinking of how I can solve this.
In near future, what I want to do is go inside each of the awesome lists and parse results to save to cache for all lists. So you search a list in Alfred, press enter and then inside Alfred again search for result you need (super fast as everything is cached). Alternatively you could press cmd + return and open the list in browser.
For opening CONTRIBUTING.md page I am not quite sure how to solve it. I wish GitHub solved it on their end so contributing.md and CONTRIBUTING.md are the same but since that's not the case your solution seems to be the only choice. It just seems kind of expensive to do it. But maybe I am wrong.
There are some repositories that host readme.md instead of README.md which results in Page not found error on Github.
Can you explain a case where this happens and is an issue?
I randomly stumbled upon this. When trying to open awe node
with edit list
command.
It's not a serious issue, since the workflow itself works.
I'm wondering if it's possible to do a GraphQL
query on the root of a repository, parse the result for needed file and then use the provided name. Or show an error that the file doesn't exist.
Something like this:
{
repository(owner: "sindresorhus", name: "awesome-nodejs") {
defaultBranchRef {
target {
... on Commit {
tree {
entries {
name
type
}
}
}
}
}
}
}
Which returns:
{
"data": {
"repository": {
"defaultBranchRef": {
"target": {
"tree": {
"entries": [
{
"name": ".editorconfig",
"type": "blob"
},
{
"name": ".gitattributes",
"type": "blob"
},
{
"name": ".github",
"type": "tree"
},
{
"name": "code-of-conduct.md",
"type": "blob"
},
{
"name": "contributing.md",
"type": "blob"
},
{
"name": "media",
"type": "tree"
},
{
"name": "readme.md",
"type": "blob"
}
]
}
}
}
}
}
}
This might work. Will try it in a bit.