-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create linear issue branch #1
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hxghhhh Looking good so far man, added some quick comments!
for _ in range(count): | ||
click.echo(f"Hello, {name}!") | ||
|
||
# reference: https://click.palletsprojects.com/en/7.x/quickstart/#echoing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add one line here on what the reference helps with or the context?
use_json=True, | ||
headers={ | ||
"Content-type": "application/json", | ||
"Authorization": "V4HEChjkzfY0kCWIQolWmiY2XS220M2FhCU1NFzm", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it cool to expose the auth token like this? Not sure if it's specific to you or not, but if it is might want to put this in env file or something. But probably a v2 thing to add auth and store it
retries=3, transport=sample_transport, fetch_schema_from_transport=True | ||
) | ||
|
||
query = gql( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks dope, can't wait to dive into graphql more
|
||
# Build issueIdentifier | ||
issues = [] | ||
for issue in data.get("viewer").get("assignedIssues").get("nodes"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if .get
throws an error if the key doesn't exist in Python, but might want to handle this in case the data returns an error or invalid response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.get
with return None in any case so the functional statement in the foor loop won't execute
linear.py
Outdated
os.system(f"gh pr create {issue_selected}") | ||
|
||
|
||
# Build issueTitle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented code (unless it's for future features)
Allow users to pull all the task branch names associated with them. This is strictly a POC will continue build out the proper flow.
Todo:
--connect
)