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

Support multifile gists #36

Open
AlexDaniel opened this issue Sep 22, 2016 · 3 comments
Open

Support multifile gists #36

AlexDaniel opened this issue Sep 22, 2016 · 3 comments
Labels
testneeded Issue is generally resolved but tests were not written yet whateverable Issues affecting the bot framework (and therefore all of the bots)

Comments

@AlexDaniel
Copy link
Member

Not sure what would this mean exactly, but that would be great.

@AlexDaniel
Copy link
Member Author

Probably depends on #25

@AlexDaniel AlexDaniel added the whateverable Issues affecting the bot framework (and therefore all of the bots) label Sep 22, 2016
@AlexDaniel AlexDaniel added the testneeded Issue is generally resolved but tests were not written yet label Jan 6, 2017
@AlexDaniel AlexDaniel removed the testneeded Issue is generally resolved but tests were not written yet label Mar 12, 2017
@AlexDaniel AlexDaniel added the blocked ☹ Underlying issue is outside this repo, a ticket was filed label Jul 21, 2017
@AlexDaniel
Copy link
Member Author

Blocked by #25.

@AlexDaniel AlexDaniel self-assigned this Jun 2, 2018
@AlexDaniel
Copy link
Member Author

Actually, it's not that hard, and I'll go ahead and do it. Nowadays we have sandbox/ directory, which is one of a few paths that are writable. So we can just throw some stuff into it and execute it as normal. Whether it's super secure or not is somewhat irrelevant given that we already allow to execute one file, so executing more than one shouldn't be any less secure really…

AlexDaniel added a commit that referenced this issue Jun 2, 2018
Resolves a long-standing issue #36 (but no tests yet).

It works by saving all files in ‘sandbox/’, which is pretty much the
only writable path. As a bonus, you should be able to use all saved
files from other bots (note that all bots will now support multifile
gists, so being able to reuse the files is not strictly needed).

Also, this commit somewhat resolves an annoying issue #66 (support for
non-raw github links), but I think we'd need to add gitlab and
bitbucket in order to close it completely.

How does it figure out which file should be executed? There are some
heuristics in place, but generally it will prefer perl6 scripts over
anything else (either use .p6 extension or include a shebang). There's
no such problem when there's only one file.

Note that in order to use .pm6 files you'd also need to
write 「use lib ‘sandbox/’」.
@AlexDaniel AlexDaniel added testneeded Issue is generally resolved but tests were not written yet and removed blocked ☹ Underlying issue is outside this repo, a ticket was filed labels Jun 2, 2018
@AlexDaniel AlexDaniel removed their assignment Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testneeded Issue is generally resolved but tests were not written yet whateverable Issues affecting the bot framework (and therefore all of the bots)
Projects
None yet
Development

No branches or pull requests

1 participant