Comments (3)
I looked at the module pullrequests.py and found the class below expects to pass in "parent".
What is the value of "parent'?
class PullRequest(ResourceBase):
def init(self, id, url, client, parent):
.
.
.
Thanks,
Lynna
from stashy.
Here's the errors I encountered when I compile the code. The issue is the "parent" parameter, and I don't know what should the right value. Please shed some light on this.
$python test.py
Traceback (most recent call last):
File "test.py", line 8, in
creq=req.create("Talking CLI PR Title", "refs/heads/test-pr-python", "refs/heads/master", description='CLI Python', state='OPEN', reviewers="monica")
File "", line 2, in create
File "/usr/lib/python2.7/site-packages/stashy/errors.py", line 62, in response_or_error
response = fn(*args, **kw)
File "/usr/lib/python2.7/site-packages/stashy/pullrequests.py", line 264, in create
fromRef=self._make_ref(fromRef, "fromRef"),
File "/usr/lib/python2.7/site-packages/stashy/pullrequests.py", line 248, in _make_ref
repo = self._parent.get()
AttributeError: 'str' object has no attribute 'get'
=================================================
$ cat test.py
import stashy
from stashy.pullrequests import PullRequest, PullRequests
stash=stashy.connect("http://mybitbucker.com:7990", "admin", "admin")
client=stash._client;
parent=""
req=PullRequests("http://mybitbucker.com:7990", client, parent)
creq=req.create("Talking CLI PR Title", "refs/heads/test-pr-python", "refs/heads/master", description='CLI Python', state='OPEN', reviewers="monica")
from stashy.
Ok, so here's what worked for me
import stashy
from stashy.pullrequests import PullRequest, PullRequests
stash=stashy.connect("http://mybitbucker.com:7990", "admin", "admin")
client=stash._client;
projectKey = 'PROJECT_KEY_FROM_THAT_PROJECT_LIST_COLUMN_IN_THE_UI'
repoKey = 'MY_DESTINATION_REPO'
project = stash.projects[projectKey]
parent= project.repos['repoKey]
req=PullRequests("/projects/" + projectKey + "/repos/" + repoKey + "/pull-requests", client, parent)
# ^^^^ you super need that /pull-requests part of the path!!!!
creq=req.create("Talking CLI PR Title", "refs/heads/test-pr-python", "refs/heads/master", description='CLI Python', state='OPEN', reviewers="monica")
from stashy.
Related Issues (20)
- Add Get and Put Functionality for "Allow Forks" Setting
- Not able to list project, Project repo's and admins
- How to get the repo list in bitbucket which has default branch as develop?
- Checking All the Merged Pull Requests. HOT 3
- New version release on pip HOT 3
- Infinite Loop when request changes for Pull Request with more than "page.max.changes"
- How to Extract All commits from and dev or master branch with in repository HOT 2
- bitBucket.projects[project['key']].repos[repo.get('slug')].commits('2020-03-03','2020-02-02') not working HOT 1
- API core URL incorrectly determined
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- using https to connect does not work HOT 1
- Add support for username update
- New pypi release? HOT 6
- Support for python 3.8 / 3.9? HOT 1
- Getting GenericException: Unknown error: 501
- Add "merges" option
- Can't connect to BitBucket server
- How to get the details like email id and full name of the authenticated user
- stashy isnt updated in pypi since 2021
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stashy.