Skip to content
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

set the updated to nil when the entry is still draft #95

Merged
merged 1 commit into from
Oct 14, 2023

Conversation

Songmu
Copy link
Member

@Songmu Songmu commented Oct 14, 2023

下書き時にはupdatedは明示的に指定しない限り、はてなブログ内部的には値は代入されていない。

参考: https://github.com/x-motemen/blogsync/blob/master/doc/date.md

今、blogysyncの下書き更新時に、明示的にMarkdown内のDateをupdatedに指定して更新しているが、そうするとupdatedが固定されて実際の日時に追随されなくなり、実際の公開時に過去の日時が公開日時にされてしまうので嬉しくない。

なので、下書き時にはDateは使わないようにする。
(公開したエントリーを下書きに戻した時にもしかしたらちょっと困るかも知れないが、エッジケースなので一旦OKとする)

@coveralls
Copy link

coveralls commented Oct 14, 2023

Pull Request Test Coverage Report for Build 6518359392

  • 3 of 15 (20.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 26.929%

Changes Missing Coverage Covered Lines Changed/Added Lines %
entry.go 3 15 20.0%
Totals Coverage Status
Change from base Build 6518148993: 0.2%
Covered Lines: 185
Relevant Lines: 687

💛 - Coveralls

@Songmu Songmu force-pushed the no-date-for-draft branch 3 times, most recently from 05aea5a to 8bcca2b Compare October 14, 2023 14:52
@Songmu Songmu merged commit 91659d4 into master Oct 14, 2023
7 checks passed
@Songmu Songmu deleted the no-date-for-draft branch October 14, 2023 15:09
@github-actions github-actions bot mentioned this pull request Oct 14, 2023
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.

None yet

2 participants