tea pulls create does not work for me #169

Closed
opened 2020-08-18 15:26:31 +00:00 by noerw · 6 comments
Member

Context

I have a local checkout of my fork of this repo:

~/src/code.gitea.io/tea $ git remote -v
origin  git@gitea.com:noerw/tea (fetch)
origin  git@gitea.com:noerw/tea (push)
upstream        git@gitea.com:gitea/tea (fetch)
upstream        git@gitea.com:gitea/tea (push)

Expected behaviour:

tea pulls create will create a pull request to the upstream remote.

Actual behaviour

Instead, it creates a PR on my fork.

It's not great UX, but it's somewhat ok as there are flags to override the target base.
What is not ok, is that these override flags don't work:

  • --repo flag is ignored, still publishes on my fork

    $ tea pulls create --repo gitea/tea
    #4 format duration as seconds for csv & yaml output
    noerw created 2020-08-18 15:13:08
    
    fixes #167
    https://gitea.com/noerw/tea/pulls/4
    
  • --base flag fails (with a bad error message)

    $ tea pulls create --base upstream/master
    2020/08/18 17:14:31 404 Not Found
    
  • --remote flag fails (with a bad error message)

    $ tea pulls create --remote upstream
    2020/08/18 17:15:48 404 Not Found
    

In addition, to me as a user (with quite some understanding of tea internals!) it is totally unclear which of these flag would be the right one, so the help text needs clarification.

#### Context I have a local checkout of my fork of this repo: ```sh ~/src/code.gitea.io/tea $ git remote -v origin git@gitea.com:noerw/tea (fetch) origin git@gitea.com:noerw/tea (push) upstream git@gitea.com:gitea/tea (fetch) upstream git@gitea.com:gitea/tea (push) ``` #### Expected behaviour: `tea pulls create` will create a pull request to the `upstream` remote. #### Actual behaviour Instead, it creates a PR on my fork. It's not great UX, but it's somewhat ok as there are flags to override the target base. What is not ok, is that these override flags don't work: - `--repo flag` is ignored, still publishes on my fork ```sh $ tea pulls create --repo gitea/tea #4 format duration as seconds for csv & yaml output noerw created 2020-08-18 15:13:08 fixes #167 https://gitea.com/noerw/tea/pulls/4 ``` - `--base flag` fails (with a bad error message) ```sh $ tea pulls create --base upstream/master 2020/08/18 17:14:31 404 Not Found ``` - `--remote flag` fails (with a bad error message) ```sh $ tea pulls create --remote upstream 2020/08/18 17:15:48 404 Not Found ``` In addition, to me as a user (with quite some understanding of `tea` internals!) it is totally unclear which of these flag would be the right one, so the help text needs clarification.
lunny added the
kind/bug
label 2020-08-19 08:54:27 +00:00
Author
Member

@6543 You implemented that feature, can you give some insight how the flags listed above are supposed to work?

@6543 You implemented that feature, can you give some insight how the flags listed above are supposed to work?
Owner

--repo gitea/tea should not be ignored but ingeneral
--repo at the moment only take paths to cloned repos
☝️ big downside witch I'd like to remove when having some time

`--repo gitea/tea` should not be ignored but ingeneral --repo at the moment only take paths to cloned repos ☝️ big downside witch I'd like to remove when having some time
6543 added this to the v0.5.0 milestone 2020-08-28 01:29:13 +00:00
Owner

@noerw can you test if #178 works for you?

@noerw can you test if https://gitea.com/gitea/tea/pulls/178 works for you?
Owner

@noerw I'll close this for now, feel free to ask for reopen it

@noerw I'll close this for now, feel free to ask for reopen it
6543 closed this issue 2020-09-16 14:22:11 +00:00
Author
Member

It still doesn't work ;)

  • --repo is broken due to #191
  • --remote still seems not supported. That would be ok for me, but then we should remove this flag from the command.

edit:
--remote correctly sets login, owner, repo, but the call to CreatePullRequest() yields a 404 Not Found error.
I now think this is because it looks for the head branch in the target repo, not in the originating repo, as head only contains a branch name.

@6543

It still doesn't work ;) - `--repo` is broken due to #191 - ~~`--remote` still seems not supported. That would be ok for me, but then we should remove this flag from the command.~~ *edit*: `--remote` correctly sets login, owner, repo, but the call to `CreatePullRequest()` yields a `404 Not Found` error. I now think this is because it looks for the head branch in the target repo, not in the originating repo, as `head` only contains a branch name. @6543
noerw reopened this issue 2020-09-19 08:27:15 +00:00
Author
Member

Can confirm the 404 issue:
It works when calling tea pr create --remote upstream --head <owner>:<branch>, where <owner> is the gitea username of the remote that <branch> belongs to.

So we somehow need to find remote of current branch & extract user name from the remote URL..?

Can confirm the 404 issue: It works when calling `tea pr create --remote upstream --head <owner>:<branch>`, where `<owner>` is the gitea username of the remote that `<branch>` belongs to. So we somehow need to find remote of current branch & extract user name from the remote URL..?
6543 added the
status/has-pull
label 2020-09-19 11:33:00 +00:00
6543 closed this issue 2020-09-24 10:44:06 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/tea#169
No description provided.