Skip to content

Support posting campaign#382

Merged
yuta0709 merged 3 commits into
mainfrom
support-posting-campaign
Jul 2, 2026
Merged

Support posting campaign#382
yuta0709 merged 3 commits into
mainfrom
support-posting-campaign

Conversation

@yuta0709

@yuta0709 yuta0709 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What

  • 開催中の記事投稿キャンペーン一覧を取得するコマンドを追加
$ qiita posting-campaigns
<記事投稿キャンペーンのタイトル>
  UUID:               <キャンペーンのUUID>
  期間:               2026/06/01 10:00 〜 2026/07/13 23:59
  キャンペーンページ: https://qiita.com/official-events/:uuid
  規約:               https://qiita.com/official-event-terms/post-event
  • 記事の投稿・更新時に記事投稿キャンペーンに紐付け・解除ができるようにした

Screenshots

プレビュー画面のスクリーンショット

UUIDを指定して同意 UUIDを指定して未同意 存在しないUUIDを指定
スクリーンショット 2026-07-01 16 50 53 スクリーンショット 2026-07-01 16 51 15 スクリーンショット 2026-07-01 16 51 01

How

  • frontmatterに記事投稿キャンペーンのUUIDと同意済みフラグを設定して公開・更新することで、記事投稿キャンペーンに紐づける設計とした

Why

  • Qiita CLI から投稿した記事を記事投稿キャンペーンに紐づけるには、投稿後にブラウザで記事の編集画面を開き、公開設定から登録する必要があり、手間がかかっていた。Qiita CLI からの投稿時に紐づけられるようにすることで、記事投稿の体験を向上させたい。

Refs

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces support for Qiita article posting campaigns. It adds a new posting-campaigns command to list active and upcoming campaigns, updates frontmatter parsing and validation to support posting_campaign_uuid and agreed_posting_campaign_term, and ensures campaigns are not linked to private articles. Feedback was provided regarding the error handling of QiitaUnprocessableEntityError (HTTP 422) in src/lib/error-handler.ts, pointing out that hardcoding the error message to only mention campaign-related issues is misleading since 422 errors can occur for other validation failures. It is recommended to output the actual API error message alongside a campaign-specific hint.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/lib/error-handler.ts
@yuta0709 yuta0709 force-pushed the support-posting-campaign branch 2 times, most recently from 1adb3f4 to 1e1f787 Compare July 1, 2026 01:37
@yuta0709 yuta0709 requested review from a team and atm-snag2 and removed request for a team July 1, 2026 01:39
@yuta0709 yuta0709 self-assigned this Jul 1, 2026
@yuta0709 yuta0709 removed the request for review from atm-snag2 July 1, 2026 01:41
@yuta0709 yuta0709 force-pushed the support-posting-campaign branch 2 times, most recently from 7b91393 to 5b10db0 Compare July 1, 2026 02:19
@yuta0709 yuta0709 requested a review from atm-snag2 July 1, 2026 02:21
yuta0709 and others added 3 commits July 2, 2026 12:16
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolve the linked campaign by UUID and display its title as a link to the
campaign page, along with the term agreement status, in the article info
panel of the web preview.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@yuta0709 yuta0709 force-pushed the support-posting-campaign branch from 8ca51b7 to 850bf65 Compare July 2, 2026 03:16
@yuta0709 yuta0709 merged commit e80be72 into main Jul 2, 2026
6 checks passed
@yuta0709 yuta0709 deleted the support-posting-campaign branch July 2, 2026 03:40
@yuta0709 yuta0709 mentioned this pull request Jul 2, 2026
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