Skip to content

feat: Add --project flag to tmpo milestone [start | finish | status]#108

Merged
DylanDevelops merged 2 commits intomainfrom
ravel/global-milestone-start
Apr 3, 2026
Merged

feat: Add --project flag to tmpo milestone [start | finish | status]#108
DylanDevelops merged 2 commits intomainfrom
ravel/global-milestone-start

Conversation

@DylanDevelops
Copy link
Copy Markdown
Owner

Pull Request Checklist

  • I have read and followed the contribution guidelines.
  • My pull request targets the main branch of tmpo.
  • I have tested these changes locally on my machine.

Closes #106

Description

This pull request enhances the milestones CLI commands by adding a --project (or -p) flag to the start, finish, and status subcommands. This allows users to specify a particular global project when managing milestones, increasing flexibility and control over milestone operations.

New flag for project selection:

  • Added a --project (-p) flag to the milestones start, milestones finish, and milestones status commands, enabling users to target a specific global project when running these commands. [1] [2] [3]
  • Updated the logic in each command to use the new flag by calling project.DetectConfiguredProjectWithOverride with the provided project value, instead of always detecting the configured project automatically. [1] [2] [3]
  • Introduced new variables to hold the project flag values in each command file. [1] [2] [3]

Copy link
Copy Markdown

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

Adds a --project/-p override to milestone subcommands so users can operate on a specific global project from any directory (aligning milestone behavior with other commands that already support project overrides).

Changes:

  • Added --project/-p flags to milestone start, milestone finish, and milestone status.
  • Updated each command to resolve the project via project.DetectConfiguredProjectWithOverride(...) instead of always using local detection.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
cmd/milestones/start.go Adds --project/-p and uses override-aware project detection for starting milestones.
cmd/milestones/finish.go Adds --project/-p and uses override-aware project detection for finishing milestones.
cmd/milestones/status.go Adds --project/-p and uses override-aware project detection for milestone status.
Comments suppressed due to low confidence (2)

cmd/milestones/finish.go:36

  • With DetectConfiguredProjectWithOverride, this command can operate on a project other than the locally configured one. However, the subsequent error text “No active milestone found” (and the help text) doesn’t indicate which project was checked, which can be confusing when --project is used. Consider including projectName in the no-active-milestone message (e.g., “No active milestone found for ”) and updating the Long description that currently says “for the current project”.
			projectName, err := project.DetectConfiguredProjectWithOverride(finishMilestoneProjectFlag)
			if err != nil {
				ui.PrintError(ui.EmojiError, fmt.Sprintf("detecting project: %v", err))
				os.Exit(1)
			}

cmd/milestones/status.go:38

  • Similar to finish, this now supports --project, but the command help still claims it reports status “for the current project”, and the “No active milestone” warning doesn’t indicate which project was checked. Update the help text and consider including projectName in the no-active warning/output to avoid confusion when users run tmpo milestone status --project <name> from another directory.
			projectName, err := project.DetectConfiguredProjectWithOverride(statusMilestoneProjectFlag)
			if err != nil {
				ui.PrintError(ui.EmojiError, fmt.Sprintf("detecting project: %v", err))
				os.Exit(1)
			}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DylanDevelops DylanDevelops changed the title feat: Add --project flag to milestones commands feat: Add --project flag to tmpo milestone [start] | [finish] | [status] Apr 3, 2026
@DylanDevelops DylanDevelops changed the title feat: Add --project flag to tmpo milestone [start] | [finish] | [status] feat: Add --project flag to tmpo milestone [start | finish | status] Apr 3, 2026
@DylanDevelops DylanDevelops changed the title feat: Add --project flag to tmpo milestone [start | finish | status] feat: Add --project flag to tmpo milestone [start | finish | status] Apr 3, 2026
@DylanDevelops DylanDevelops merged commit bbf29f9 into main Apr 3, 2026
5 checks passed
@DylanDevelops DylanDevelops deleted the ravel/global-milestone-start branch April 3, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Start a milestone for a specific global project in any folder

2 participants