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

feat: add singleCommit option #208

Merged
merged 1 commit into from
Jan 23, 2023
Merged
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
7 changes: 6 additions & 1 deletion src/helpers/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export const getUptimeMonitorVersion = async () => {
return release;
};

const introComment = async () => `# This file was generated by upptime/uptime-monitor@${await getUptimeMonitorVersion()}
const introComment =
async () => `# This file was generated by upptime/uptime-monitor@${await getUptimeMonitorVersion()}
#
# ===============================
# Do not edit this file directly!
Expand Down Expand Up @@ -102,6 +103,7 @@ export const setupCiWorkflow = async () => {
const config = await getConfig();
const workflowSchedule = config.workflowSchedule || {};
const commitMessages = config.commitMessages || {};
const statusWebsite = config["status-website"] || {};

return `${await introComment()}

Expand Down Expand Up @@ -158,6 +160,7 @@ jobs:
with:
github_token: \${{ secrets.GH_PAT }}
publish_dir: "site/status-page/__sapper__/export/"
force_orphan: "${statusWebsite.singleCommit || false}"
user_name: "${commitMessages.commitAuthorName || "Upptime Bot"}"
user_email: "${
commitMessages.commitAuthorEmail || "73812536+upptime-bot@users.noreply.github.com"
Expand All @@ -169,6 +172,7 @@ export const siteCiWorkflow = async () => {
const config = await getConfig();
const workflowSchedule = config.workflowSchedule || {};
const commitMessages = config.commitMessages || {};
const statusWebsite = config["status-website"] || {};

return `${await introComment()}

Expand Down Expand Up @@ -201,6 +205,7 @@ jobs:
with:
github_token: \${{ secrets.GH_PAT }}
publish_dir: "site/status-page/__sapper__/export/"
force_orphan: "${statusWebsite.singleCommit || false}"
user_name: "${commitMessages.commitAuthorName || "Upptime Bot"}"
user_email: "${
commitMessages.commitAuthorEmail || "73812536+upptime-bot@users.noreply.github.com"
Expand Down
1 change: 1 addition & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export interface UpptimeConfig {
introMessage?: string;
navbar?: { title: string; url: string }[];
publish?: boolean;
singleCommit?: boolean;
};
skipDescriptionUpdate?: boolean;
skipTopicsUpdate?: boolean;
Expand Down