{"id":16918242,"url":"https://github.com/vito/bass-loop","last_synced_at":"2025-03-22T11:30:48.224Z","repository":{"id":40203295,"uuid":"494813925","full_name":"vito/bass-loop","owner":"vito","description":"a continuous Bass service","archived":false,"fork":false,"pushed_at":"2023-05-26T17:23:13.000Z","size":10425,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T10:46:06.427Z","etag":null,"topics":["bass","ci","ci-cd","github","go"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vito.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-21T14:58:00.000Z","updated_at":"2024-12-13T05:31:35.000Z","dependencies_parsed_at":"2024-06-20T05:47:04.010Z","dependency_job_id":"1b2fa60d-8f2d-4cfb-a2e2-9a5f14764832","html_url":"https://github.com/vito/bass-loop","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vito%2Fbass-loop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vito%2Fbass-loop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vito%2Fbass-loop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vito%2Fbass-loop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vito","download_url":"https://codeload.github.com/vito/bass-loop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244951097,"owners_count":20537319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bass","ci","ci-cd","github","go"],"created_at":"2024-10-13T19:39:20.840Z","updated_at":"2025-03-22T11:30:46.193Z","avatar_url":"https://github.com/vito.png","language":"JavaScript","readme":"# bass loop\n\nA continuous [Bass](https://github.com/vito/bass) service. Currently geared towards GitHub but other integrations should be possible.\n\nSee [the Announcement](https://github.com/vito/bass-loop/discussions/1) for more details - a proper README will come shortly!\n\n## demo\n\nSee [Bass Loop demo](https://github.com/vito/bass-loop-demo) for a repo to play\naround with.\n\n## installation\n\nNote: you only need to install Bass Loop if you're planning to run your own\nserver.\n\nUsing Go 1.18+:\n\n```sh\ngit clone https://github.com/vito/bass-loop\ngo install github.com/livebud/bud\nnpm install # or pnpm, or yarn, or [...]\nbud build\n```\n\n## the plan\n\n- [x] A GitHub app for running Bass GitHub event handlers in-repo (kinda like GitHub actions).\n  - [x] A shorthand for the common case of running checks.\n- [x] A web UI for viewing thunk output (so a 'details URL' can be set on GitHub checks).\n  - [ ] A thunk that contains secrets should default to private visibility.\n- [x] A SSH server so that users can bring their own workers (i.e. their local machine).\n  - [ ] A method for passing secrets to thunks via the runner so sensitive values never even leave the machine.\n  - [x] A method for PR authors to satisfy PR checks using their own workers, without the repo maintainer having to run them.\n- [ ] Scalable - everyone brings-their-own-worker, so only the Loop has to be scaled out.\n- [ ] Make it a little more friendly. Right now the frontpage is pretty cryptic; it's purely driven by the 'navigating from GitHub' use case at the moment, but a dash of metadata could help tie things back in the other direction.\n\n## GitHub App configuration\n\nFirst, go to [Register new GitHub App](https://github.com/settings/apps/new).\nThis guide will walk you through the creation steps. Don't worry too much as\neverything can be changed later.\n\nSet the **GitHub App name** to whatever you want, but keep in mind this is a\nglobal (to GitHub) namespace. Set whatever description you deem appropriate -\nthis will show up when users view your app. Feel free to steal the description\nfrom my [Bass CI app](https://github.com/apps/bass-ci).\n\nSet the **Homepage URL** to the external URL of your app e.g.\n`https://example.com`. If you're kicking the tires, use\n[ngrok](https://ngrok.com/) to serve your local Loop to the public internet:\n\nuse an address like `https://abcd-123-45-67-89.ngrok.io`.\n\nSkip the \"Callback URL\" section.\n\nSkip the \"Identifying and authorizing users\" section - it's unused.\n\nSkip the \"Post installation\" section too unless you've got your own page to\ntake them to. Loop might provide one of these someday; it'd be nice UX for\ngetting started.\n\n### Webhook\n\nEnable webhooks.\n\nSet **Webhook URL** to e.g. `https://example.com/integrations/github/events`\n\nSet a **Webhook secret** for a real public installation so people can't spoof\nwebhook payloads.\n\n### Repository permissions\n\n**Checks**: Read and write. This is Loop's main function.\n\n**Contents**: Read-only. Needed to receive `push` events. Also needed to fetch\nthe repo's `project.bass` script.\n\nThe remaining permissions are up to you; it depends on what type of events you\nwant to send to repos. As you enable more permissions, more events become\navailable in the next \"Subscribe to events\" section later on.\n\n**Pull requests**: Read-only. To be honest, this might not be necessary.\n\n### Organization permissions\n\nNo access required.\n\n### User permissions\n\nNo access required.\n\n### Subscribe to events\n\nAs stated before this is up to you, but here are the events enabled for\n[loop.bass-lang.org](https://loop.bass-lang.org) at the time of writing:\n\n- [x] Meta\n- [x] Pull request\n- [x] Push\n- [x] Release\n\n### Create the app\n\nWhen it asks **Where can this GitHub App be installed?**, pick which option\nmakes sense for you. You can always change it later, so it's probably safest to\nleave it as **Only on this account** since it's harder to restrict it once\npeople have installed it.\n\nFinally, click **Create GitHub App**!\n\n### Display Information\n\nOnce you've created your app you can set a nice logo! This will show up on\nstatus checks and on the app itself.\n\nYou can generate a Bass logo in your favorite colors like so:\n\n```sh\ngit clone https://github.com/vito/bass\ncd bass/\n./docs/scripts/generate-logo docs/ico/base16-\u003cTHEME\u003e.svg logo.png\n```\n\n### Private keys\n\nYour app needs a private key configured in order to make requests on behalf of\nusers. Click \"Generate a private key\" to create and download one.\n\n### Run `bass-loop` with GitHub app config\n\nCopy your app ID from the top of the settings page, put your private key\nsomewhere within reach, and set the following env vars:\n\n```sh\nexport GITHUB_APP_ID=12345 \nexport GITHUB_APP_WEBHOOK_SECRET=mysecret\nexport GITHUB_APP_PRIVATE_KEY_PATH=app-private-key.pem\n```\n\nThen, build and run the Bud app:\n\n```sh\nbud build\n./bud/app\n```\n\nAny env vars that point to paths (i.e. vars ending in `_PATH`) can also be set\nto direct content by setting it as the var name without `_PATH`.\n\nI personally use 1Password and the `op` CLI like so:\n\n```sh\ncat \u003e creds.env \u003c\u003cEOF\nGITHUB_APP_ID = 12345\nGITHUB_APP_WEBHOOK_SECRET = op://Bass/webhook-secret/password\nGITHUB_APP_PRIVATE_KEY = op://Bass/github-app-private-key/private-key\nEOF\n\neval $(op signin)\n\nop run --no-masking --env-file ./creds.env ./bud/app\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvito%2Fbass-loop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvito%2Fbass-loop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvito%2Fbass-loop/lists"}