Readme

This script creates a daily standup post on Campsite every day at 5:30pm ET.

Learn about how we run our async standups on Campsite: https://www.campsite.com/blog/effective-daily-standups-for-distributed-teams

Campsite API Documentation: https://campsite.com/docs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* Campsite Daily Standup
*
* This script creates a daily standup post on Campsite every day at 5:30pm ET.
*
* Learn about how we run our async standups on Campsite:
* https://www.campsite.com/blog/effective-daily-standups-for-distributed-teams
*
* Campsite API docs:
* https://campsite.com/docs
*/
// These environment variables are required:
const CAMPSITE_API_KEY = Deno.env.get("CAMPBOT_API_KEY");
// Set these to your own values:
const DAILY_UPDATES_PROJECT_ID = "izu9x0b54xy2";
const MEMBERS = [
"3her0vv6fb75", // Brian,
"mqssgn0wm7so", // Ryan,
"ntodpqcg879d", // Nick,
"zwvznmxcpiel", // Dan,
"el8fwvr2jttt", // Alexandru,
];
const MENTIONS = MEMBERS.map((id) => `<@${id}>`).join(" ");
const CONTENT = `What did you work on today?\n\n${MENTIONS}`;
export default async function(interval: Interval) {
const title = new Date().toLocaleDateString("en-US", {
month: "long",
day: "numeric",
year: "numeric",
});
const body = {
title,
content_markdown: CONTENT,
project_id: DAILY_UPDATES_PROJECT_ID,
};
const campsiteResponse = await fetch("https://api.campsite.com/v2/posts", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${CAMPSITE_API_KEY}`,
},
body: JSON.stringify(body),
});
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
September 18, 2024