Skip to content

Add force option to pull command #30

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

Merged
merged 1 commit into from
Jul 18, 2023
Merged

Conversation

fussy113
Copy link
Contributor

@fussy113 fussy113 commented Jul 17, 2023

What

  • qiita pull --force オプション、エイリアスとなる-fを追加しました。
    • public 配下のmarkdownファイルを全て更新します。
  • オプションの追加をReadmeに記載しました。

How

  • qiita pullコマンドで --force オプション、-f オプションを受け付けるように変更
    • syncArticlesFromQiita の関数に、isLocalUpdate引数を追加
    • 引数によって、public 配下のmarkdownファイルを全て更新するかを条件分岐しています

Why

  • 現在のqiita pull コマンドは、差分のあるmarkdownファイルを更新しないようになっている
  • GitHub Actionsなどでqiita pull コマンドを実行して、markdownをリモートに同期させたい時、差分があると見なされうまく更新できないことがありました。
    • こちらを解消したく、--forceコマンドがあると良いのではと考えました。

Refs

  • コーディング規約、修正などあれば指摘いただくか、修正いただければと思います:bow:

@getty104
Copy link
Member

@fussy113 ありがとうございます!レビューさせていただきますね 🙏

@getty104 getty104 self-requested a review July 18, 2023 03:14
Copy link
Member

@getty104 getty104 left a comment

Choose a reason for hiding this comment

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

LGTM!
ご対応ありがとうございました 🙏

@getty104 getty104 merged commit 5feb3a2 into increments:main Jul 18, 2023
@ohakutsu ohakutsu mentioned this pull request Jul 19, 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.

2 participants