Skip to content

ENG-1994 Automatically add merged Obsidian issues to in-progress Linear release - #1254

Open
trangdoan982 wants to merge 6 commits into
eng-1767-setup-linear-release-for-obsidian-v2from
eng-1994-track-merged-obsidian-issues-in-linear-release
Open

ENG-1994 Automatically add merged Obsidian issues to in-progress Linear release#1254
trangdoan982 wants to merge 6 commits into
eng-1767-setup-linear-release-for-obsidian-v2from
eng-1994-track-merged-obsidian-issues-in-linear-release

Conversation

@trangdoan982

@trangdoan982 trangdoan982 commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Add obsidian-main.yaml: on every push to main touching apps/obsidian/**, compute the next beta version, publish a -beta.n release via publish.ts, commit the version bump back ([skip ci]), and sync the merged PR/issue onto whichever Linear release is currently in progress — mirroring how roam-main.yaml already does this for Roam
  • Document the automatic beta-release flow in apps/obsidian/README.md

Stacked on #1253 (ENG-1767) — depends on its publish.ts version write-back fix to compute the next beta number from an accurate baseline. Base branch is eng-1767-setup-linear-release-for-obsidian-v2, not main; this should be merged after (or with) that PR.

Test plan

To test this workflow, I need to merge them first. Rationale:
GitHub only allows manually triggering a workflow_dispatch workflow once its file exists on the default branch (main) — per their docs: "This event will only trigger a workflow run if the workflow file exists on the default branch."

Our new workflows only live on feature branches right now, so GitHub won't let us dispatch/test them yet. Once #1253 merges, we can trigger and iterate on them directly.

  • js-yaml parse check on the new workflow YAML
  • Dry-ran the beta-version-increment bash logic (bare stable → -beta.1, -beta.N-beta.N+1)
  • Merge a test PR touching apps/obsidian/** and confirm: beta release appears on GitHub, mirror repo (discourse-graph-obsidian) gets updated, version bump commits back to main without retriggering itself, and Linear's in-progress release picks up the synced issue

Open in Devin Review

@linear-code

linear-code Bot commented Jul 27, 2026

Copy link
Copy Markdown

ENG-1994

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
discourse-graph Error Error Jul 29, 2026 10:46pm

Request Review

@supabase

supabase Bot commented Jul 27, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

Comment thread .github/workflows/obsidian-main.yaml
Comment thread .github/workflows/obsidian-main.yaml
@trangdoan982
trangdoan982 force-pushed the eng-1994-track-merged-obsidian-issues-in-linear-release branch from 78cf47b to 13ff66b Compare July 27, 2026 15:38
@trangdoan982
trangdoan982 requested a review from mdroidian July 27, 2026 15:53
@mdroidian

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d9e9f70ba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/obsidian-main.yaml Outdated
git config user.email "github-actions[bot]@users.noreply.github.com"
git add apps/obsidian/package.json apps/obsidian/manifest.json
git commit -m "chore: bump obsidian version to ${{ steps.version.outputs.version }} [skip ci]"
git push

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Make the version-bump push resilient to concurrent merges

When another PR is merged while this workflow is publishing, the checkout remains on the earlier push SHA and this plain git push cannot fast-forward over the newer main. The preceding publish step has already created the beta release and updated the mirror, but the source version remains unchanged; the queued run then computes the same beta version and fails while trying to publish an existing release. Fetch and integrate the latest main, or derive/reserve the version without relying on a post-publication push.

Useful? React with 👍 / 👎.

@mdroidian

Copy link
Copy Markdown
Member

@trangdoan982 is the goal of this PR to "Automatically add merged Obsidian issues to in-progress" or to cut an obsidian beta release?

@mdroidian mdroidian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think there's an issue here with what's happening with the versions. It seems like the mirror package JSON is going to be behind. And it also seems like we're committing back a -beta version to main on the monorepo? Is this the intended behavior? It's not quite clear to me because the ticket, I thought, was adding issues to in-progress Linear releases but this is dealing with beta version releases as well.

Could you double check when/where the versions change and create a video walkthrough of what the full intent is here, please?

Comment thread .github/workflows/obsidian-main.yaml Outdated
trangdoan982 and others added 4 commits July 29, 2026 16:32
…ar release

Add obsidian-main.yaml: on every merge to main touching apps/obsidian,
cut a beta GitHub release and sync the merged PR/issue onto whichever
Linear release is currently in progress, mirroring how roam-main.yaml
already does this for Roam. Depends on ENG-1767's publish.ts version
write-back to compute the next beta number from an accurate baseline.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Same reasoning as the stable workflow: GitHub Actions forces
"implicit" mode via SUPABASE_URL/SUPABASE_PUBLISHABLE_KEY regardless
of SUPABASE_USE_DB, so the variable had no effect here either.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Two PRs merging to main in quick succession would otherwise both
compute the same next beta version off the same package.json read,
racing to publish the same version and push conflicting version-bump
commits. Concurrency group queues runs one at a time instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@trangdoan982
trangdoan982 force-pushed the eng-1994-track-merged-obsidian-issues-in-linear-release branch from 6d9e9f7 to a31c20b Compare July 29, 2026 20:32
@trangdoan982

Copy link
Copy Markdown
Member Author

Rebased onto the latest eng-1767-setup-linear-release-for-obsidian-v2 and fixed the Linear release secret key to OBSIDIAN_LINEAR_RELEASE_KEY (matching obsidian-release.yaml).

To answer your question: yes, both behaviors are intentional in the same workflow. Every push to main touching Obsidian paths should (1) cut a beta release so users on the beta channel get the update, and (2) sync the merged issue onto whichever Linear release is currently in progress — those two steps together are what "Automatically add merged Obsidian issues to in-progress Linear release" means in practice. The beta version bump committed back to main (with [skip ci]) is the mechanism that tracks what has been released so the next run can compute the next version correctly.

The mirror package.json is updated by publish.ts (from PR #1253) during the "Publish beta release" step — it writes the new version into both the monorepo apps/obsidian/package.json and the mirror repo before the version-bump commit lands on main, so the mirror stays in sync.

…idian mirror

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a PR is merged while the beta-release workflow is running,
the plain git push fails (non-fast-forward). Fetching and rebasing
onto origin/main before the push makes the workflow resilient to
concurrent merges. If the rebase conflicts (manual version edit),
abort and skip the push gracefully — the release already exists
and the version file self-corrects on the next run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants