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

Was able to publish a patch without requesting a review first. #62

Open
RyanHedges opened this issue Jan 24, 2022 · 5 comments
Open

Was able to publish a patch without requesting a review first. #62

RyanHedges opened this issue Jan 24, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@RyanHedges
Copy link
Contributor

I was able to pub a patch without it having an obvious corresponding review.

I had two patches, where patch id 1 had a review requested. I meant to publish 1 but typed 0 accidentally. the below output was done after performing a pull and a new rr 1. In the output below you'll see a gps which is my alias for git-ps command. I'm on v1.1.1. I did a couple test on a clean repo and I haven't been able to reproduce. making two commits and trying to pub one that doesn't have a requested review fails to publish as expected. I'm unsure of the commands ran before this happened but I'm sure there were rebases, pulls, and publishing of other patches.

Console output
$ gps ls                                                                                                       3.0.2 Fri 21 :clock2:  11:21:47
  1 rr  221f36 Fix bug with black avatars on heatmap page
  0     13058d Move reset view control to its own component
~/projects/prism-labs/poc-website main 221f368
$ gps pub 0                                                                                                    3.0.2 Fri 21 :clock2:  11:21:50
- found .git dir - /Users/hedges/projects/prism-labs/poc-website/.git
- loaded request review state repository
- fetched patch at index - 0
- verified no uncommited changes are present
- identified originating branch - main
- parsed patch id (30461F14-AF9D-430E-8AC6-31E8E9C84E0B) out of commit description
- failed to find record in request review state repository for id - 30461F14-AF9D-430E-8AC6-31E8E9C84E0B
- generated slug based branch name - ps/rr/move_reset_view_control_to_its_own_component
- found upstream branch - origin/main
- fetched main
- created branch (ps/rr/move_reset_view_control_to_its_own_component) on (origin/main)
- checked out ps/rr/move_reset_view_control_to_its_own_component
- cherry picking commit - 13058deb55afa0dcf8697bdd63927e31ecd4bf84
- successfully cherry picked commit - 13058deb55afa0dcf8697bdd63927e31ecd4bf84 to 5e52d641cc1161312ae9f046f3ef1f8187ab3c94
- force pushed ps/rr/move_reset_view_control_to_its_own_component up to origin
- recorded patch id, branch name, and commit sha association in request review state repository
- checked out main so you are where you started
~/projects/prism-labs/poc-website main 221f368
$ gps ls                                                                                                       3.0.2 Fri 21 :clock2:  11:22:01
  1 rr  221f36 Fix bug with black avatars on heatmap page
  0   p 13058d Move reset view control to its own component
@drewdeponte
Copy link
Owner

This should have prevented you from doing this as that patch had never had a review requested.

There must a bug with the enforcement of that rule or something. But that is the intended behavior and the -f switch is intended to force the pub even if you have never requested review for that patch.

@drewdeponte drewdeponte added the bug Something isn't working label Jan 24, 2022
@drewdeponte
Copy link
Owner

@RyanHedges I just tested this on my machine with a recent patch and it worked correctly. What version of git-ps are you using?

See output from command line with my test.

~/code/uptech/pullwalla-macos
✔ git ps ls                                                                                                                                                                                                                    1m main 01f7aa5
  0     01f7aa Port Create Comment to composable architecture

~/code/uptech/pullwalla-macos
✔ git ps pub 0                                                                                                                                                                                                                 1m main 01f7aa5
- found .git dir - /Users/adeponte/code/uptech/pullwalla-macos/.git
- loaded request review state repository
- fetched patch at index - 0
- verified no uncommited changes are present
- identified originating branch - main
Looks like you haven't requested review for this patch yet. Please do so before publishing. If you want to publish without requesting review use 'git-ps pub -f'.

~/code/uptech/pullwalla-macos
✔ git-ps --version                                                                                                                                                                                                             1m main 01f7aa5
v1.1.1

@RyanHedges
Copy link
Contributor Author

@drewdeponte v1.1.1. I tried reproducing without any luck before creating this issue. I had the same results you posted.

@drewdeponte
Copy link
Owner

@RyanHedges so are you saying the behavior is inconsistent?

@RyanHedges
Copy link
Contributor Author

@drewdeponte Yes, the behavior appears to be inconsistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants