Skip to content

chore(ci): push mongosh tag separately during release #2508

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
Jul 22, 2025
Merged

Conversation

gagik
Copy link
Contributor

@gagik gagik commented Jul 21, 2025

Since GitHub Actions only runs create tag workflows when no more than 3 tags are created (https://docs.github.com/en/actions/reference/events-that-trigger-workflows#create), we will push the mongosh tag separately to ensure it triggers the merge tag workflow

@Copilot Copilot AI review requested due to automatic review settings July 21, 2025 14:46
@gagik gagik requested a review from a team as a code owner July 21, 2025 14:46
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the package publishing process to push the mongosh tag separately during release to ensure GitHub Actions workflow triggers work correctly. GitHub Actions has a limitation where create tag workflows only run when 3 or fewer tags are created simultaneously.

  • Adds separate git push command for mongosh tag to bypass GitHub Actions tag creation limit
  • Includes conditional logic to skip this operation during dry runs
  • Documents the GitHub Actions limitation with inline comments

@@ -111,6 +111,17 @@ export class PackagePublisher {
if (!mongoshVersion) {
throw new Error('mongosh package not found');
}

if (mongoshVersion && !this.config.isDryRun) {
Copy link
Preview

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition mongoshVersion && !this.config.isDryRun is redundant since mongoshVersion was already validated on line 111-113 with an error thrown if it's falsy. The condition can be simplified to just if (!this.config.isDryRun).

Suggested change
if (mongoshVersion && !this.config.isDryRun) {
if (!this.config.isDryRun) {

Copilot uses AI. Check for mistakes.

Copy link
Collaborator

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but Copilot's comment does seem to make sense :)

Since GitHub Actions only runs create tag workflows when no more than 3 tags are created (https://docs.github.com/en/actions/reference/events-that-trigger-workflows#create), we will push the mongosh tag separately to ensure it triggers the merge tag workflow
@gagik gagik force-pushed the gagik/mongosh-test branch from 1e97975 to b4fd81b Compare July 21, 2025 14:48
@gagik gagik added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label Jul 21, 2025
@gagik gagik merged commit b800744 into main Jul 22, 2025
117 of 129 checks passed
@gagik gagik deleted the gagik/mongosh-test branch July 22, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants