Skip to content

Commit

Permalink
fix: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Jan 19, 2021
1 parent eea9bf5 commit bcd6e35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/template-processor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export class TemplateProcessor extends Service {

case "push":
if (request.repository) {
if(request.ref && request.ref.contains("template-sync")) {
if(request.ref && request.ref.includes("template-sync")) {
this.info(`skipping ref ${request.ref}`);
return;
return {};
}

const options = {};
Expand Down
6 changes: 3 additions & 3 deletions tests/github-hook-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ test("request ping", async t => {
t.deepEqual(JSON.parse(response.body), { received: "ping" });
});

test("request unknwon", async t => {
test("request unknown", async t => {
const signature = sign(Buffer.from(pingBody), secret);

try {
Expand All @@ -87,7 +87,7 @@ test("request unknwon", async t => {
"X-Hub-Signature": signature,
"content-type": "application/json",
"X-GitHub-Delivery": "7453c7ec-5fa2-11e9-9af1-60fccbf37b5b",
"X-GitHub-Event": "unknwon"
"X-GitHub-Event": "unknown"
},
body: pingBody
}
Expand All @@ -104,7 +104,7 @@ const pingBody = JSON.stringify({
});

const pushBody = JSON.stringify({
ref: "refs/heads/template-sync-1",
ref: "refs/heads/master",
before: "0e19c5c2e158421ee2b2dfe0a70c29604b9d0cea",
after: "0000000000000000000000000000000000000000",
created: false,
Expand Down

0 comments on commit bcd6e35

Please sign in to comment.