Skip to content

Commit f002689

Browse files
committed
Change default branch from master to main
1 parent b37a4a7 commit f002689

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Example output (e.g. `clicks.txt` in `https://github.com/example/my-data.git`):
3030
- Batteries in AWS IoT buttons last for ≈1,000–2,000 presses and are not officially replaceable.
3131
You can still use this Lambda function if you intend to log more events, just consider using other triggers (e.g. [Alexa Smart Home](https://developer.amazon.com/docs/smarthome/steps-to-build-a-smart-home-skill.html)).
3232

33-
- The git repository you are writing to cannot be blank and requires to have at least one commit on the branch of your choice (`master` by default).
33+
- The git repository you are writing to cannot be blank and requires to have at least one commit on the branch of your choice (`main` by default).
3434

3535
## Configuration
3636

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const envValidators = {
4141
}),
4242
GIT_REPO_BRANCH: envalid.str({
4343
desc: "Branch to change (must exist before the ",
44-
default: "master",
44+
default: "main",
4545
}),
4646

4747
GIT_FILE_PATH: envalid.str({

src/handler.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe("handler()", () => {
7373
process.env.GIT_REPO_URI = repositoryPath;
7474
process.env.GIT_FILE_PATH = filePath;
7575
await handler(...generateHandlerArgs());
76-
await runGitCommand(["checkout", "master"]);
76+
await runGitCommand(["checkout", "main"]);
7777
const fileContents = await fs.readFile(
7878
path.resolve(repositoryPath, process.env.GIT_FILE_PATH),
7979
"utf8",
@@ -94,7 +94,7 @@ describe("handler()", () => {
9494
process.env.GIT_REPO_URI = repositoryPath;
9595
process.env.GIT_FILE_PATH = "clicks.txt";
9696
await handler(...generateHandlerArgs());
97-
await runGitCommand(["checkout", "master"]);
97+
await runGitCommand(["checkout", "main"]);
9898
const fileContents = await fs.readFile(
9999
path.resolve(repositoryPath, process.env.GIT_FILE_PATH),
100100
"utf8",
@@ -122,7 +122,7 @@ describe("handler()", () => {
122122
await handler(...generateHandlerArgs("SINGLE"));
123123
await handler(...generateHandlerArgs("DOUBLE"));
124124
await handler(...generateHandlerArgs("LONG"));
125-
await runGitCommand(["checkout", "master"]);
125+
await runGitCommand(["checkout", "main"]);
126126
const lines = (
127127
await fs.readFile(
128128
path.resolve(repositoryPath, process.env.GIT_FILE_PATH),
@@ -158,7 +158,7 @@ describe("handler()", () => {
158158
await handler(...generateHandlerArgs());
159159
process.env.EVENT_LINE_FORMAT = "%LABEL%,%TIME%\\r\\n";
160160
await handler(...generateHandlerArgs());
161-
await runGitCommand(["checkout", "master"]);
161+
await runGitCommand(["checkout", "main"]);
162162
const lines = (
163163
await fs.readFile(
164164
path.resolve(repositoryPath, process.env.GIT_FILE_PATH),

src/testHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const generateHandlerArgs = (clickType: IotButtonClickType = "SINGLE") =>
4242

4343
export const createTemporaryRepository = async ({
4444
filesByPath,
45-
branch: branch = "master",
45+
branch: branch = "main",
4646
}: {
4747
filesByPath?: { [filePath: string]: string };
4848
branch?: string;

0 commit comments

Comments
 (0)