Git Product home page Git Product logo

Comments (3)

timvink avatar timvink commented on August 28, 2024

I'm having trouble reproducing this one. I assume this is a situation where you have viewing rights but not contributing rights. Probably what is happening is that the error message is communicated via stdout instead of stderr. I made error handling code a bit more robust for this:

d2c10df#diff-04186dccbae3e4068b23960111707533a0a45468dbd51a2000fd9a83ee46f6fdR170-R171

Will release shortly, then you can try and see if this fixes it. Update: try v1.0.1

from doing-cli.

PaulHofma avatar PaulHofma commented on August 28, 2024

Hmm this didn't quite do it, it would appear. I do believe it is exactly the situation which you describe (can view but can't contribute).

Actual error message (I've only copied the last bit since pasting the provided error messages doesn't work great, sadly, due to the formatting):

| /usr/local/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site │
│ -packages/doing/pr/create_pr.py:113 in cmd_create_pr │
│ │
│ 110 │ │ cmd = f"az repos ref create --name 'heads/{branch_name}' --repository '{repo_nam │
│ 111 │ │ cmd += f"--object-id '{master_branch_object_id}' -p '{project}' --org '{organiza │
│ 112 │ │ branch = run_command(cmd) │
│ ❱ 113 │ │ assert branch.get("success") │
│ 114 │ │ console.print(f"[dark_orange3]>[/dark_orange3] Created remote branch '[cyan]{bra │
│ 115 │ │
│ 116 │ # Create the PR
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AssertionError:

So interestingly enough, I think the issue is that the function itself doesn't error out - it only gives an info message. Then the branch.get assert fails, as we couldn't actually create the branch.

from doing-cli.

timvink avatar timvink commented on August 28, 2024

Thanks for this! I should have added a helpful error message there, which I did now:

), f"Could not create '{branch_name}'. Do you have contributor rights to the '{get_repo_name()}' repo?" # noqa

Will be released in v1.1 in a bit. Thanks for reporting this stuff, really helps make doing better!

from doing-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.