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

Issue command for Jira #246

Closed
6 tasks
groenborg opened this issue Sep 11, 2017 · 4 comments
Closed
6 tasks

Issue command for Jira #246

groenborg opened this issue Sep 11, 2017 · 4 comments

Comments

@groenborg
Copy link
Collaborator

groenborg commented Sep 11, 2017

As a user I would like to list my issues in my terminal so I quickly can get a glance of the current issues

Grooming

Behaviour

  • (GitHub) Running git issues should print an unsorted list of the first 30 open issues. Pagination should be possible.

  • (Jira) Running git issues should print 30 of the Jira issues you have access to, unsorted and uncategorized. Pagination should be possible

Research / Questions

  • Should we support a project-key for Jira, so issues are fetched from a specific project in stead of all of them. Should the project key, be in the config or as an argument or both?

  • Is pagination important? If so, figure out wether or not it is possible to implement pagination for both GitHub and Jira - JOKER

Tasks

  • Issues does not support config, make it do so.

  • remove the pipe to less and more on windows. It messes up everything.

  • Should support a target configuration, to get the URL for your issue service

  • Tests needs to be cleaned up

  • Move GetIssuesfor the GitHub api to the new Standard

  • Create a GetIssue function for Jira

NOTE: None of the code in the Issue function is reusable. So this task requires a complete rewrite of the function.

@groenborg groenborg added this to the Phlow Version 4.0 milestone Sep 11, 2017
@groenborg groenborg changed the title Create Issue command for Jira Issue command for Jira Sep 13, 2017
@groenborg
Copy link
Collaborator Author

Pagination for GitHub

According to their API, when calling the get issues API, a link header will appear with the next set of issue so this base:
https://api.github.com/repos/praqma/git-phlow/issues&per_page=30 will return this: https://api.github.com/repositories/79813336/issues?per_page=2&page=2

See the documentation here: https://developer.github.com/v3/#pagination

There is support for going to the last page as well.

Issue

To be able to paginate, we require state. Where should that state be and when should it reset.

suggestion

  • When running git issues, we save the link to the next state in an environment variable. When rerunning git issue it should not paginate. Pagination starts when either git issues next or git issue -n has been called

@groenborg
Copy link
Collaborator Author

Looks like it is a bit more difficult for Jira https://docs.atlassian.com/jira/REST/cloud/

@groenborg
Copy link
Collaborator Author

Pagination is outside the scope, so the size can be downgraded.

@groenborg
Copy link
Collaborator Author

fixed in this commit. Did a wrong workon 0479204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants