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

feat: add renovate.json #203

Merged
merged 3 commits into from
Aug 29, 2024
Merged

feat: add renovate.json #203

merged 3 commits into from
Aug 29, 2024

Conversation

waya279
Copy link
Contributor

@waya279 waya279 commented Aug 24, 2024

参考サイト:https://book.st-hakky.com/hakky/how-to-setup-renovate/

renovate.jsonファイルを追加、追記してます。
ファイルの中身は、とりあえず参考サイト通りにしてます。

自動管理してほしい「パッケージマネージャー」を追加していく流れになります。
今回は、「github-actions、dockerfile、npm、gomod」を設定してます。

今後、追加予定です。

@waya279 waya279 requested a review from a team as a code owner August 24, 2024 15:38
Copy link

vercel bot commented Aug 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
peace-net ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2024 11:20am

.github/renovate.json Outdated Show resolved Hide resolved
.github/renovate.json Outdated Show resolved Hide resolved
@naruse666
Copy link
Contributor

@waya279
あとブランチをリベースしてください!
mainブランチでgit pullしてからこのprブランチでgit rebase main.

@R1013-T
Copy link
Member

R1013-T commented Aug 24, 2024

今回npmじゃなくてpnpmを使用してるんですけど、そこは関係なくいい感じにやってくれるんですかね?生成されるファイルとかが違ってくるんですけど、

@waya279
Copy link
Contributor Author

waya279 commented Aug 24, 2024

@naruse666
mainブランチでgit pul -> ◯
このprブランチでgit rebase main. -> ✕

Error
`PS D:\hackathon\giiku\Peace-Net> git rebase main

error: cannot rebase: You have unstaged changes.

error: Please commit or stash them.`

@R1013-T
Copy link
Member

R1013-T commented Aug 24, 2024

今回npmじゃなくてpnpmを使用してるんですけど、そこは関係なくいい感じにやってくれるんですかね?生成されるファイルとかが違ってくるんですけど、

大丈夫っぽい

Copy link
Member

@R1013-T R1013-T left a comment

Choose a reason for hiding this comment

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

ありがとうございます!
うまく動くかなー

@R1013-T
Copy link
Member

R1013-T commented Aug 24, 2024

@naruse666 mainブランチでgit pul -> ◯ このprブランチでgit rebase main. -> ✕

Error `PS D:\hackathon\giiku\Peace-Net> git rebase main

error: cannot rebase: You have unstaged changes.

error: Please commit or stash them.`

これでできると思います!
git rebase --autostash main

@waya279
Copy link
Contributor Author

waya279 commented Aug 24, 2024

@naruse666 mainブランチでgit pul -> ◯ このprブランチでgit rebase main. -> ✕
Error PS D:\hackathon\giiku\Peace-Net> git rebase main error: cannot rebase: You have unstaged changes. error: Please commit or stash them.

これでできると思います! git rebase --autostash main

いけたっぽい~!!

PS D:\hackathon\giiku\Peace-Net> git rebase --autostash main
Created autostash: a964c71
Applied autostash.
Successfully rebased and updated refs/heads/feat/issue-185-renovate.

@R1013-T
Copy link
Member

R1013-T commented Aug 24, 2024

rebaseは未コミットの変更があるとできないです!

--autostash オプションを使用すると、Git は自動的に未コミットの変更を一時的に保存し、リベースを実行した後でそれらの変更を再適用します。これにより、手動で変更を管理する必要なく、安全にリベースを行うことができます。このオプションは、作業の流れを中断させずに済むため、効率的でユーザーフレンドリーな解決策となります。

@R1013-T
Copy link
Member

R1013-T commented Aug 24, 2024

@waya279
修正の右下らへんのCommit suggestionってボタン押すとGitHub上で修正をコミットできますよ〜
ローカルでやってもいいけど

@waya279
Copy link
Contributor Author

waya279 commented Aug 24, 2024

rebaseは未コミットの変更があるとできないです!

--autostash オプションを使用すると、Git は自動的に未コミットの変更を一時的に保存し、リベースを実行した後でそれらの変更を再適用します。これにより、手動で変更を管理する必要なく、安全にリベースを行うことができます。このオプションは、作業の流れを中断させずに済むため、効率的でユーザーフレンドリーな解決策となります。

mainをpullしかしてないのですが、そのあとcommitしてから「git rebase --autostash main」をするということですか?

@naruse666
Copy link
Contributor

commitしなくても--autostashすれば通るはず
あとrebaseしたらpushもしてください!

@R1013-T
Copy link
Member

R1013-T commented Aug 24, 2024

mainをpullしかしてないのですが、そのあとcommitしてから「git rebase --autostash main」をするということですか?

mainブランチでpull → ローカルのmainブランチにリモートのmainブランチを取り込み
このPRのブランチでrebase → ローカルのmainブランチの変更を、このPRのブランチに取り込む

ってことをしてると思います!
なので既にコミットしたfeat: add renovate.jsonとmainを合体してるみたいな?

@waya279
Copy link
Contributor Author

waya279 commented Aug 24, 2024

commitしなくても--autostashすれば通るはず あとrebaseしたらpushもしてください!

git pull origin ~ したら

PS D:\hackathon\giiku\Peace-Net> git push origin feat/issue-185-renovate
Enter passphrase for key '/c/Users/User/.ssh/id_ed25519':
To github.com:TECH-C-LT/Peace-Net.git
! [rejected] feat/issue-185-renovate -> feat/issue-185-renovate (non-fast-forward)
error: failed to push some refs to 'github.com:TECH-C-LT/Peace-Net.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

どうしたらいいですか;;

@R1013-T
Copy link
Member

R1013-T commented Aug 24, 2024

git pull --rebase origin @ --autostash
でコンフリクト解消してみてください〜

@R1013-T
Copy link
Member

R1013-T commented Aug 24, 2024

どこでコンフリクトしてます?

@naruse666
Copy link
Contributor

git pushした時のエラーですね~
rebase後はgit push -fする必要ありです
参考:https://qiita.com/hitochan777/items/ea08df354b42be57e5fc

@R1013-T
Copy link
Member

R1013-T commented Aug 24, 2024

フォースプッシュか!

@waya279
Copy link
Contributor Author

waya279 commented Aug 26, 2024

git pushした時のエラーですね~ rebase後はgit push -fする必要ありです 参考:https://qiita.com/hitochan777/items/ea08df354b42be57e5fc

main branchで「$ git pull --rebase origin main」したところ、
error: cannot pull with rebase: You have unstaged changes.
error: Please commit or stash them.
と返ってきて、sunshineAPI作成のときにいじったのが残っているのかと思います。
ちょっと、今度オンラインで画面共有しながらしたいです🙇

waya279 and others added 2 commits August 29, 2024 20:19
Co-authored-by: naruse (poko) <[email protected]>
Co-authored-by: naruse (poko) <[email protected]>
@waya279 waya279 merged commit 0e2193e into main Aug 29, 2024
8 checks passed
@waya279 waya279 deleted the feat/issue-185-renovate branch August 29, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants