Skip to content

feat(cli): add project update - post a status update to a project - #43

Merged
bougyman merged 1 commit into
mainfrom
issue-42
Aug 10, 2026
Merged

feat(cli): add project update - post a status update to a project#43
bougyman merged 1 commit into
mainfrom
issue-42

Conversation

@bougyman

Copy link
Copy Markdown
Member

Summary

Closes #42.

New in this port - Ruby has no equivalent, not even at the API-wrapper level. Linear has its own "Project Update" feature (a journal-style status post on a project, distinct from editing the project's own fields) via the projectUpdateCreate mutation.

  • New LinearCli.Linear.ProjectUpdate resource, mirroring Comment's shape (small, focused resource for posting a text blob attached to a parent entity)
  • lc project update <PROJECT> --body "..." [--health onTrack|atRisk|offTrack] - PROJECT is resolved the same way issue list's --project is (name/URL/ID/search term, against every project in the workspace)

Test plan

  • mix test - 182 passed (1 new test: resolves a project by name and posts a status update, asserting the exact GraphQL mutation input sent)
  • mix format --check-formatted - clean
  • Fixed a real bug caught by the test suite along the way: the generated Ash interface for post_project_update/3 needs the third arg as a plain map (%{health: ...}), not a keyword list - a keyword list gets misinterpreted as Ash framework options and 500s with a validation error
  • Updated the one pre-existing test whose exact help-text assertion shifted (column width changed since update is longer than list) - cosmetic only, not a regression

New in this port - Ruby has no equivalent, not even at the API-wrapper
level. Linear has its own "Project Update" feature (a journal-style
status post on a project, distinct from editing the project's own
fields) via the projectUpdateCreate mutation. Adds a new ProjectUpdate
resource (mirrors Comment's shape) and `lc project update <PROJECT>
--body "..." [--health onTrack|atRisk|offTrack]`, resolving PROJECT
the same way issue list's --project does.

Closes #42.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 10, 2026 00:33
@bougyman
bougyman merged commit 30dc6dc into main Aug 10, 2026
3 checks passed
@bougyman
bougyman deleted the issue-42 branch August 10, 2026 00:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds support for posting Linear “Project Updates” (journal-style status posts) from the CLI, including a new Ash resource, CLI command wiring, and coverage verifying the exact GraphQL mutation input.

Changes:

  • Introduces LinearCli.Linear.ProjectUpdate with a manual create action backed by the projectUpdateCreate mutation.
  • Adds lc project update <PROJECT> --body "..." [--health ...] command routing and display formatting for posted updates.
  • Extends CLI tests and documentation to cover the new subcommand and updated help output.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Readme.adoc Documents the new lc project update command with an example invocation.
app/test/linear_cli/cli_test.exs Adds an integration-style CLI test asserting project resolution and exact GraphQL mutation input; relaxes one help-text assertion impacted by column width.
app/lib/linear_cli/linear/project_update.ex New Ash resource + manual create implementation for projectUpdateCreate.
app/lib/linear_cli/linear.ex Exposes a domain code interface (post_project_update/…) for the new resource.
app/lib/linear_cli/cli/display.ex Adds text output formatting for ProjectUpdate results.
app/lib/linear_cli/cli/commands.ex Implements project update command logic (resolve project, post update, display result).
app/lib/linear_cli/cli.ex Adds CLI spec for the new project update subcommand, including --health parsing.
Suppressed comments (1)

app/lib/linear_cli/cli.ex:365

  • The help text for --body doesn't indicate it's required, but the command cannot succeed without it (and the README/example treats it as mandatory). Consider marking it as required in help text to reduce confusing runtime errors.
              options: [
                body: [short: "-b", long: "--body", help: "The update's content (markdown)"],
                health: [

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +69 to +80
def project_update(%{args: %{project: search}, options: options}) do
with {:ok, projects} <- Linear.projects(),
project when not is_nil(project) <- Projects.project_for(projects, search),
{:ok, update} <-
Linear.post_project_update(project.id, options.body, %{health: options.health}) do
Display.show(update, %{output: options.output})
:ok
else
nil -> {:error, {:smells_bad, "No project found matching #{search}"}}
{:error, reason} -> {:error, reason}
end
end
Comment thread app/lib/linear_cli/cli.ex
Comment on lines +357 to +361
project: [
value_name: "PROJECT",
help: "Project name, URL, ID, or search term",
required: true
]
bougyman pushed a commit that referenced this pull request Aug 10, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.8.1](v0.8.0...v0.8.1)
(2026-08-10)


### Features

* **cli:** add project update - post a status update to a project
([#43](#43))
([30dc6dc](30dc6dc))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

Add project update: post a status update to a project

2 participants