node-red / flow-library

Node-RED Flow Library
Apache License 2.0
70 stars 44 forks source link

Broken gist link #30

Closed rsenden closed 5 years ago

rsenden commented 5 years ago

I added a new flow to flows.nodered.org a couple of days ago. Apparently this creates a private gist named README.md. As this is a not very descriptive name, today I tried renaming the readme file, and also made a small update to the gist description, and made the gist public. However after a refresh, this now results in a 404 being shown at https://flows.nodered.org/flow/1cb5eced9e4f22bb2be1e86e33dbb25a.

So some questions:

Edit:

I just noticed that the flow id on flows.nodered.org is the same as my gist id, so I guess it should find the gist but maybe failed because it couldn't find a file named README.md?

I have renamed the file back to README.md, should this automatically fix the issue on flows.nodered.org once it tries to re-index this gist?

As for renaming the gist, possibly I can add another file (for example with the filename starting with dots to have it appear as the first file)?

knolleary commented 5 years ago

If you rename README.md then the flow library has no idea which file in the gist it should use as a readme. This leads it to believe the gist is no longer valid and it gets removed. The same would happen if you renamed flow.json.

As you've restored the name of the README file, I've been able to manually restored your gist to the library.

How does flows.nodered.org link to the gist? The flow library keeps a local copy of the gist. Any changes you make to the contents of the files in the gist are not reflected in the library until you click the refresh button. The library then goes and gets the latest version from your gist.

How can this issue be fixed such that flows.nodered.org shows my flow again? Done

Is there any proper way to rename a gist/change the gist description that wouldn't cause this issue?

You can edit the gist description without any problem. You just cannot rename the README.md file in the gist.

If I ever want to add another flow, is ot possible to first create a properly named gist, and then add this to flows.nodered.org?

Not currently. We do have a command-line admin task that can do it (which is what I just used to restore your flow), but we don't expose a way for you to give us the gist id.

I just noticed that the flow id on flows.nodered.org is the same as my gist id, so I guess it should find the gist but maybe failed because it couldn't find a file named README.md?

Yes - exactly that.

As for renaming the gist, possibly I can add another file (for example with the filename starting with dots to have it appear as the first file)?

We don't take any notice of files other than README.md and flow.json. So you are free to add others if you want.