Skip to content

Time in draft for pull requests metrics is always None v2 #608

@Aloshadance

Description

@Aloshadance

Describe the bug

I've encountered this problem before (#586), but after checking the fix, I found that nothing had changed. My pull request is in the draft state, I create a report and get the value None, not the time spent in the draft.

The screenshots show that the example was in a rough state for more than 1 hour.

It is suspected that for some reason the pull request is not included in the calculation sample, so the values are always zero.

To Reproduce

  1. Create pull request in the draft state.
  2. Wait a minute.
  3. Run issue metrics in a github workflow step with DRAFT_PR_TRACKING set to true.

Expected behavior

The expectations are still the same - I want to get the correct metrics. Help please :c

Screenshots

Image Image Image

Additional context

runs-on: ubuntu-latest
version of issue metrics package: latest (3.24.0)

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions