Configuring GitHub repos to run on Repl.it and contributing back
You might have noticed that it's now possible to import your GitHub repos into repls. If you haven't yet, consider connecting your GitHub account to repl.it to make it easier to import and contribute back.
In this guide I'm going to show you how to configuring a repo to run on repl.it and how you can contribute back a neat "run on repl.it" button to the repo. It looks like this:
This file cannot be displayed: https://repl.it/badge/github/plibither8/2048.cpp
I'm going to use this repo (https://github.com/plibither8/2048.cpp) as an example. (It's an implementation of 2048 in C++ that works in the terminal!)
First let's import the repo to repl.it. Click "import repo" from the header.
Then add in the repo url:
Click "create from GitHub" and after the repo clones you'll see a configuration pane to figure out the language and how to run the repo.
Now, you have to try to figure out the run command from the repo. Typically, you'd want to read the instructions in the readme or play with it in the shell to figure out how to best run it. In this case I figured out that:
- The language is cpp (from the name duh)
- From the readme I figured out that the run command should be
cd build && cmake ../ && cmake --build . && ./2048
Click "done" and then you'll see two things:
- A .replit file: This is where the configuration gets saved
- The config pane gets replaced with instructions on how to contribute the run badge and configuration back to the repo
Before we get to contribute back let's make sure it actually runs:
Sweet! Now follow the steps in the pull request pane which should give you code to paste in the readme:
Preview the readme and make sure the "run on repl.it" button renders correctly:
Now simply click on "prepare pull request" which will take you to GitHub where you can fill in the rest of the details. For this repo, I already sent a pull request. Check it out: https://github.com/plibither8/2048.cpp/pull/117
I'm excited to see more Repl.it badges all over GitHub so that all repos can be easily run. Please help people get their repos work on Repl.it and in the process contribute to open source!
this is a game changer. The PR maker is awesome for viral effect :)
BTW, this one and a couple of others will in any case blunder in light of the fact that no token has been given, however, they take care of business.
https://www.imybkexperience.com/
https://www.mykfc-experience.com/
https://www.mybpcreditcard.one/
Before running the build command, "cd build ...etc", I had to run the command "mkdir build".
how export?
Hi @amasad !
Do you have any information about how the 'Run on Repl.it' button will be affected by the sunsetting of anonymous repls? ( https://blog.repl.it/anon )
I'm preparing to give a lightning talk about Repl.it, focused on the 'Run on Repl.it' button and I'd like to anticipate what changes are in store.
Many thanks!
I see now that the changes are already rolled out, so I can answer my own questions. Sorry, don't mind me!
Great thanks!
Discord: Kognise#6356
https://github.com/kognise/repl.it-mobile/pull/7
https://github.com/HospitalRun/hospitalrun-frontend/pull/1667
https://github.com/kognise/water.css/pull/164
https://github.com/automerge/automerge/pull/225
https://github.com/picturepan2/devices.css/pull/9
https://github.com/tailwindcss/playground/pull/11
Discord Username: ozaiworld#6551
Discord: runargs#4291
https://github.com/git-game/git-game/pull/47
https://github.com/git-game/git-game-v2/pull/7
https://github.com/taniarascia/snek/pull/11
https://github.com/harshjv/threes-c/pull/3
https://github.com/mnisjk/snake/pull/2
https://github.com/itsapi/pycraft/pull/149
https://github.com/unknownblueguy6/MineSweeper/pull/6
https://github.com/pjhades/bash-snake/pull/3
https://github.com/apetro/BashVenture/pull/1
https://github.com/Dogeek/rpg-text/pull/20
https://github.com/kefranabg/readme-md-generator/pull/197
@dialogarithm pay attention before you make the pull requests, you made a second one 13 hrs after I did and mine was never closed. https://github.com/unknownblueguy6/MineSweeper/pull/5
https://github.com/unknownblueguy6/MineSweeper/pull/6
:D I like this new github feature (really makes it easy 4 a lot of projects). Honestly tho the only thing I really saw were the 70 notifications on the images lmao
@AdCharity wdym "notifications on the images"?
in the upper left [email protected]
Discord: skiboyec#5689
This one's got 5k+ stars:
https://github.com/chubin/wttr.in/pull/381
(I think this one's likely to merge, just it isn't merged yet.)
Another with 5k+ stars:
https://github.com/awslabs/aws-shell/pull/237
Only got five, since according to the post in discord they had to have 20+ stars, but here is what i got:
https://github.com/Zolmeister/avabranch/pull/1
https://github.com/AtomicPair/wolfentext3d/pull/9
https://github.com/unknownblueguy6/MineSweeper/pull/5
https://github.com/mdibaiee/node-games/pull/9
https://github.com/salifm/cli-games/pull/70
My Pull Requests:
https://github.com/richrd/suplemon/pull/260
https://github.com/google/ci_edit/pull/210
https://github.com/jarun/ddgr/pull/101
https://github.com/jarun/googler/pull/310
https://github.com/jarun/pdd/pull/15
https://github.com/per9000/lorem/pull/8
https://github.com/pkrumins/reddit-top/pull/3
https://github.com/radude/rentry/pull/3
https://github.com/frostming/legit/pull/262
https://github.com/ReFirmLabs/binwalk/pull/442
https://github.com/0k/shyaml/pull/54
https://github.com/deibit/cansina/pull/41
https://github.com/bloomreach/s4cmd/pull/169
https://github.com/almandin/fuxploider/pull/29
https://github.com/sivel/speedtest-cli/pull/679
https://github.com/donnemartin/saws/pull/117
https://github.com/architv/soccer-cli/pull/143
https://github.com/linode/linode-cli/pull/165
https://github.com/TailorDev/Watson/pull/341
https://github.com/haskellcamargo/sclack/pull/133
Does HTML work yet?
I put so much effort into this!
at least I know I can afford a new computer where I can actually code on!
Yes the console games are all different!
so my hard work pays off! :3
https://repl.it/@mmbnforlife/NES-Sprite-Editor
https://repl.it/@mmbnforlife/pygamecards
https://repl.it/@mmbnforlife/vcromclaim
https://repl.it/@mmbnforlife/RPG
https://repl.it/@mmbnforlife/PYGames
https://repl.it/@mmbnforlife/Python-Console-Games
https://repl.it/@mmbnforlife/PythonConsoleGames
https://repl.it/@mmbnforlife/Console-Games-2
https://repl.it/@mmbnforlife/consolegames
https://repl.it/@mmbnforlife/Console-Games-1
https://repl.it/@mmbnforlife/console-games-1
https://repl.it/@mmbnforlife/Console-Games
https://repl.it/@mmbnforlife/ConsoleGames-1
https://repl.it/@mmbnforlife/ConsoleGames
https://repl.it/@mmbnforlife/console-games
My discord username is ravenspired#3723.
https://github.com/Ha3MrX/Gemail-Hack/pull/26
https://github.com/serenity-valley/game/pull/15
https://github.com/Kill-Console/PythonShootGame/pull/14
https://github.com/Transcriptase/Game/pull/9
https://github.com/davesque/go.py/pull/2
https://github.com/Zolomon/reversi-ai/pull/12
https://github.com/aelmosalamy/ascii-combat/pull/22
https://github.com/code-newbies/python-thursday-adventure/pull/84
https://github.com/tylerneylon/termtris/pull/5
https://github.com/sourcerer-io/lots/pull/3
https://github.com/sourabhv/FlapPyBird/pull/22
https://github.com/niltonvolpato/python-progressbar/pull/67
https://github.com/tasdikrahman/spaceShooter/pull/21
https://github.com/JonPizza/recursive-maze-solver/pull/5
https://github.com/vungocbinh2009/pytexexam/pull/2
https://github.com/sherlock-project/sherlock/pull/441
https://github.com/epic0007224/random-translate-bot/pull/1
@vityavv https://github.com/FlyingKatsu-Discord-Bots/Discord-GitLab-Webhook/pull/16
BTW, this one and a few others will still error because no token has been provided, but they do work
@vityavv https://github.com/DiscordBotList/Luca/pull/42 this one you have to add the token to the end
My discord username is VexeDev#0520
https://github.com/tancredi/python-console-snake/pull/20
Any planned support for other git platforms like BitBucket? (the one I use) or GitLab? (the one my dad uses)