Skip to content

Make all merges to dev change status to Completed (Staging) #18

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

Merged
merged 1 commit into from
Jan 24, 2025
Merged
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
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
Loading