Skip to content

Commit c3ed656

Browse files
committed
chore(global): commit everything from laptop for backup purposes
pardon if this commit message is not detailed for now, just need to declutter stuff bts Signed-off-by: Andrei Jiroh Halili <[email protected]>
1 parent de6d2c8 commit c3ed656

File tree

4 files changed

+58
-66
lines changed

4 files changed

+58
-66
lines changed

.env

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#/-------------------[DOTENV_PUBLIC_KEY]--------------------/
2+
#/ public-key encryption for .env files /
3+
#/ [how it works](https://dotenvx.com/encryption) /
4+
#/----------------------------------------------------------/
5+
DOTENV_PUBLIC_KEY="0262d41ba5941b11658eae09a41abedf8d2a2ef2da037fd3689bdffc933e3e9bd1"
6+
7+
# .env
8+
SLACK_BOT_TOKEN="encrypted:BKpRKAgaPEVOlVef20HyFmp3+OIialu9wlUO95W6ULJ+93aRPlZsgKeBMxXFyi3Ip/ehGqT3l/Wan/k7/h3xOmOMziaSQpgssmScgmKjVA55sCQwVrE3nG2SbuQm+lkIlolCqlSk4XJlscU+OfUK7SnTIhojhSgMNEFXjcfcm0JfP4PSi9UF7apyenReWjp3B9KQJFwsVA=="

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributing to this project
2+
3+
Thank you for your interest in contributing into

README.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
1-
# Squad Bots
1+
# Recap Time Squad Bots
22

3-
The monorepo for @RecapTimeBot and related bots, our helpful bot slash service account for things like issues and merge requests moderation, repository mirroring and API-related stuff.
3+
[![Open in Gitpod](https://img.shields.io/badge/Open_in_Gitpod-orange?style=flat-square&logo=gitpod&logoColor=white)](https://gitpod.io/#https://github.com/RecapTime/squad-bots)
4+
[![Open in Codespaces](https://img.shields.io/badge/Open_in_Codespaces-black?style=flat-square&logo=github&logoColor=white)](https://codespaces.new/recaptime-dev/squad-bots)
5+
[![project chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg?logo=zulip&logoColor=white&style=flat-square)](https://recaptime-dev.zulipchat.com)
46

5-
[![Open in Gitpod](https://img.shields.io/badge/Open%20in-Gitpod-orange?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://github.com/RecapTime/squad-bots)
7+
The monorepo for @RecapTimeBot and related bots, our helpful bot slash service
8+
account for things like issues and merge requests moderation, repository mirroring
9+
and other API-related stuff.
610

7-
## Developing with real credentials
11+
## Bots in this repository
812

9-
**For squad members**: Make sure you have your own `DOPPLER_TOKEN` provisioned if you're using secrets from our Doppler project via the Doppler CLI.
13+
* [`slackbot`](./packages/slackbot/) - The @RecapTimeBot Slack app on Hack Club HQ
1014

11-
### Keybase bots
15+
## License
1216

13-
It is recommended to use a custom home directory (with the `--home` flag[^1] before any commands) to ensure your Keybase session survives between workspace restarts.
14-
15-
```bash
16-
## Stage 1: Authenticate against the deamon
17-
# In Gitpod, /workspace/.keybase-userdata should be autocreated at workspace init for you.
18-
# Confirm that Keybase service (and optionally KBFS is running) before doing this.
19-
keybase --home /workspace/.keybase-userdata login
20-
# Another option here is make a oneshot session
21-
KEYBASE_USERNAME=yourbothere KEYBASE_PAPERKEY="paper key here" keybase oneshot
22-
```
23-
24-
[^1]: https://gist.github.com/solvaholic/4cd483b14179e3f5c652c358aaa9bf0a
17+
MPL-2.0, unless otherwise specified.

packages/slackbot/README.md

Lines changed: 36 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,57 @@
1-
# Bolt for JavaScript (TypeScript) Template App
1+
# `@recaptimebot/slack` - The Recap Time Bot Slack App
22

3-
This is a generic Bolt for JavaScript (TypeScript) template app used to build out Slack apps.
3+
![Version](https://img.shields.io/badge/version-0.1.0-blue.svg?cacheSeconds=2592000)
4+
[![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen.svg)](https://wiki.recaptime.dev/handbook/tools/recaptimebot#slack-app)
5+
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/slack-samples/bolt-ts-starter-template/graphs/commit-activity)
6+
[![License: MPL--2.0](https://img.shields.io/github/license/recaptime-dev/squad-bots)](https://github.com/recaptime-dev/squad-bots/blob/main/LICENSE)
7+
[![Twitter: ajhalili2006](https://img.shields.io/twitter/follow/ajhalili2006.svg?style=social)](https://twitter.com/ajhalili2006)
48

5-
Before getting started, make sure you have a development workspace where you have permissions to install apps. If you don’t have one setup, go ahead and [create one](https://slack.com/create).
9+
The multitool @RecapTimeBot Slack app for Recap Time Squad's channels and projects on Hack Club HQ Slack workspace.
610

7-
## Installation
11+
### 🏠 [Homepage and docs](https://wiki.recaptime.dev/handbook/tools/recaptimebot#slack-app) (coming soon)
812

9-
#### Create a Slack App
13+
### [Try the bot on Hack Club HQ Slack](https://hackclub.slack.com)
1014

11-
1. Open [https://api.slack.com/apps/new](https://api.slack.com/apps/new) and choose "From an app manifest"
12-
2. Choose the workspace you want to install the application to
13-
3. Copy the contents of [manifest.json](./manifest.json) into the text box that says `*Paste your manifest code here*` (within the JSON tab) and click _Next_
14-
4. Review the configuration and click _Create_
15-
5. Click _Install to Workspace_ and _Allow_ on the screen that follows. You'll then be redirected to the App Configuration dashboard.
15+
## Setup
1616

17-
#### Environment Variables
17+
```sh
18+
# Install deps
19+
npm install
1820

19-
Before you can run the app, you'll need to store some environment variables.
2021

21-
1. Copy `env.sample` to `.env`
22-
2. Open your apps configuration page from [this list](https://api.slack.com/apps), click _OAuth & Permissions_ in the left hand menu, then copy the _Bot User OAuth Token_ into your `.env` file under `SLACK_BOT_TOKEN`
23-
3. Click _Basic Information_ from the left hand menu and follow the steps in the _App-Level Tokens_ section to create an app-level token with the `connections:write` scope. Copy that token into your `.env` as `SLACK_APP_TOKEN`.
24-
25-
#### Install Dependencies
26-
27-
`npm install`
28-
29-
#### Run Bolt Server
30-
31-
`npm start`
32-
33-
## Project Structure
34-
35-
### `manifest.json`
36-
37-
`manifest.json` is a configuration for Slack apps. With a manifest, you can create an app with a pre-defined configuration, or adjust the configuration of an existing app.
22+
# Ask @ajhalili2006 for the .env.keys on
23+
# Hack Club Slack at #recaptime-dev channel.
24+
# Just don't leak them.
25+
```
3826

39-
### `app.ts`
27+
## Usage
4028

41-
`app.ts` is the entry point for the application and is the file you'll run to start the server. This project aims to keep this file as thin as possible, primarily using it as a way to route inbound requests.
29+
* Run using dev database: `npm run dev`
30+
* Run in production: `npm run start`
31+
* Migrate database: `npm run migrate:prod` (or `dotenvx run -f .env.production -- npx prism push db`)
4232

43-
### `/listeners`
33+
## Author
4434

45-
Every incoming request is routed to a "listener". Inside this directory, we group each listener based on the Slack Platform feature used, so `/listeners/shortcuts` handles incoming [Shortcuts](https://api.slack.com/interactivity/shortcuts) requests, `/listeners/views` handles [View submissions](https://api.slack.com/reference/interaction-payloads/views#view_submission) and so on.
35+
👤 **Andrei Jiroh Halili** - SABDFL at RecapTime.dev, Hack Clubber since Arcade 2024
4636

47-
## App Distribution / OAuth
37+
* Website: https://links.andreijiroh.dev
38+
* Fediverse: [@ajhalili2006@tilde.zone](https://tilde.zone/@ajhalili2006)
39+
* Twitter: [@ajhalili2006](https://twitter.com/ajhalili2006)
40+
* Github: [@ajhalili2006](https://github.com/ajhalili2006)
41+
* LinkedIn: [@ajhalili2006](https://linkedin.com/in/ajhalili2006)
4842

49-
Only implement OAuth if you plan to distribute your application across multiple workspaces. A separate `app-oauth.ts` file can be found with relevant OAuth settings.
43+
## 🤝 Contributing
5044

51-
When using OAuth, Slack requires a public URL where it can send requests. In this template app, we've used [`ngrok`](https://ngrok.com/download). Checkout [this guide](https://ngrok.com/docs#getting-started-expose) for setting it up.
45+
Contributions, issues and feature requests are welcome!
5246

53-
Start `ngrok` to access the app on an external network and create a redirect URL for OAuth.
47+
Feel free to check [the meta issue tracker](https://github.com/recaptime-dev/community/issues). You can also take a look at the [contributing guide](../../CONTRIBUTING.md).
5448

55-
```
56-
ngrok http 3000
57-
```
49+
## 📝 License
5850

59-
This output should include a forwarding address for `http` and `https` (we'll use `https`). It should look something like the following:
51+
Copyright © 2024 [Andrei Jiroh Halili](https://github.com/ajhalili2006) of Recap Time Squad and contributors.
6052

61-
```
62-
Forwarding https://3cb89939.ngrok.io -> http://localhost:3000
63-
```
53+
This project is [MPL-2.0](https://github.com/recaptime-dev/squad-bots/blob/main/LICENSE) licensed.
6454

65-
Navigate to **OAuth & Permissions** in your app configuration and click **Add a Redirect URL**. The redirect URL should be set to your `ngrok` forwarding address with the `slack/oauth_redirect` path appended. For example:
55+
---
6656

67-
```
68-
https://3cb89939.ngrok.io/slack/oauth_redirect
69-
```
57+
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_

0 commit comments

Comments
 (0)