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

Adding draft status for GH and Gerrit #1035

Merged
merged 4 commits into from
Mar 2, 2024

Conversation

thekad
Copy link
Contributor

@thekad thekad commented Feb 12, 2024

A draft pull request is identified by a different draft boolean flag, not by the state field, but it might be an important field to display.

@ryneeverett
Copy link
Collaborator

I'm not sure about this. My initial thought is that it is probably reasonable to add the draft status as an additional UDA rather than combining it into the state field.

We generally pass data from external API's into UDA's with minimal transformation with the premise that the taskwarrior database is largely for consumption by further automation. For example, somebody could have their priority tuned by uda.githubstate.open, which would be somewhat broken by this change. The point is not so much that this is a breaking change as that it breaks the assumption that bugwarrior will pass through API fields with minimal transformation, which allows bugwarrior users to develop scripts based directly on the third party API's rather than based on bugwarrior's intermediary data format.

I don't know if it is relevant to your use case but I would note that the github.query option can be used to filter out draft pull requests with draft:false, which I'd imagine might be a common thing to want.

@thekad
Copy link
Contributor Author

thekad commented Feb 13, 2024

@ryneeverett I have the status displayed in the subject line of my tasks e.g. [{{ githubstatus | upper }}] and if something is shown as [DRAFT] I want to know is coming (but don't look at it just yet) or adjust its priority when it changes to [OPEN]. I had the same thought about adding a new UDA but wasn't sure which direction was best, I will update the PR to use this approach instead.

@ryneeverett
Copy link
Collaborator

You can of course use taskwarrior in whatever way is useful to you but it does strike me as odd to want to see unactionable tasks. I would think unactionable tasks should have such a low priority that one would never actually see them. Perhaps you don't have that many actionable tasks though.

@thekad thekad changed the title Adding logic for draft pull requests Adding draft status for GH and Gerrit Feb 15, 2024
These show the draft/wip status for both services

Signed-off-by: Jorge Gallegos <[email protected]>
Copy link
Collaborator

@ryneeverett ryneeverett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the only example we currently have is gitlabwip, but the consensus so far has been that we should handle booleans as numeric UDA's with a binary value (0 or 1) since there is no such thing as a boolean UDA.

@ryneeverett ryneeverett merged commit 1096ed6 into GothenburgBitFactory:develop Mar 2, 2024
36 checks passed
NexAdn pushed a commit to NexAdn/bugwarrior that referenced this pull request Sep 19, 2024
* Adding new UDAs to github and gerrit

These show the draft/wip status for both services

Signed-off-by: Jorge Gallegos <[email protected]>

* Updating test cases to account for new UDAs

Signed-off-by: Jorge Gallegos <[email protected]>

* wip/draft should be a numeric, make it like gitlab

Signed-off-by: Jorge Gallegos <[email protected]>

* add tests for draft/wip status and update UDA

Signed-off-by: Jorge Gallegos <[email protected]>

---------

Signed-off-by: Jorge Gallegos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants