Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typographical errors #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/handlers/PipelineUpdateHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ class PipelineUpdateHandler extends Handler {
pipeline.set("isFullyGreen", isFullyGreen);
} else {
const stageHistory = await Go.fetchStageHistory(pipeline.get("name"), pipeline.get("stage.name"));
const hasPreviousBuildSuceeded = this.hasPreviousBuildFailed(pipeline, stageHistory);
if (hasPreviousBuildSuceeded) {
// Previous build suceeded, we don't need to notify again
const hasPreviousBuildSucceeded = this.hasPreviousBuildFailed(pipeline, stageHistory);
if (hasPreviousBuildSucceeded) {
// Previous build succeeded, we don't need to notify again
return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ app.action({ callback_id: "build_response" }, async ({ action, say, ack }) => {
let msg = "Error, invalid payload";
if (action.name === "rerun") {
const result = await Go.runFailedJobs(payload.uri);
msg = (result?.message || "Error trigerring build") + ` for ${payload.name}`;
msg = (result?.message || "Error triggering build") + ` for ${payload.name}`;
}

if (action.name === "output" && payload.jobs?.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/services/go.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Go = {
console.log("Rerun response", data);
return data;
} catch (err) {
console.log("Error re-trigerring", err.message);
console.log("Error re-triggering", err.message);
return { message: err.message };
}
},
Expand Down
8 changes: 4 additions & 4 deletions src/templates/PipelineFailedNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PipelineFailedNotification {

const fields = [];

// Jira link and emails that committed and trigerred the build
// Jira link and emails that committed and triggered the build
const jira = pipeline.getTicketNumber() ? `<${pipeline.getTicketUrl()}|${pipeline.getTicketNumber()}>` : null;

// Special message if the build is fully green
Expand Down Expand Up @@ -74,16 +74,16 @@ class PipelineFailedNotification {
fields.push({ title: `Failed Jobs (${failedJobs.length})`, value: message });
}

const emails = [`Commited By: ${pipeline.getCommitterEmail()}`];
const emails = [`Committed By: ${pipeline.getCommitterEmail()}`];
if (pipeline.getApprovedByEmail() && pipeline.getApprovedByEmail() !== pipeline.getCommitterEmail()) {
emails.push(`Trigerred by: ${pipeline.getApprovedByEmail()}`);
emails.push(`Triggered by: ${pipeline.getApprovedByEmail()}`);
}

let footer = `Status: ${pipeline.get("stage.result")}, well done`;
if (pipeline.hasFailed()) {
footer = `Status: ${pipeline.getFailedJobs().length} jobs & ${failedTestsCount} tests failed`;
} else if (this.pipeline.get("isFullyGreen")) {
footer = `Status: Fully successfull`;
footer = `Status: Fully successful`;
}

const actions = [];
Expand Down