Skip to content

Commit

Permalink
Merge pull request #18 from coursedog/adjust-for-continuos-deployments
Browse files Browse the repository at this point in the history
Make all merges to dev change status to Completed (Staging)
  • Loading branch information
shentao authored Jan 24, 2025
2 parents 3f1014d + b90713a commit de31e62
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions update_notion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ async function _updateNotionStatuses (branch) {
}
break
case 'staging':
if (commitMessage.includes('from coursedog/dev')) {
// Update all tasks that are in Completed Dev to Completed Staging
notionUtil.updateByStatus('Completed (Dev)', 'Completed (Staging)')
} else if (commitMessage.match(/#+[0-9]/)) {
// direct from open PR to staging
if (commitMessage.match(/#+[0-9]/)) {
const prNumber = extractPrNumber(commitMessage)
if (!prNumber) return
notionUtil.updateByPR(`${repositoryName}/pull/${prNumber}`, 'Completed (Staging)')
Expand All @@ -104,7 +100,7 @@ async function _updateNotionStatuses (branch) {
// direct from open PR to dev
const prNumber = extractPrNumber(commitMessage)
if (!prNumber) return
notionUtil.updateByPR(`${repositoryName}/pull/${prNumber}`, 'Completed (Dev)')
notionUtil.updateByPR(`${repositoryName}/pull/${prNumber}`, 'Completed (Staging)')
}
break

Expand Down

0 comments on commit de31e62

Please sign in to comment.