Skip to content

Integration with V2 Projects #57

Open

Description

@e0d

Firstly, thanks for this action, it's extremely useful.

However, I've been very excited to move our PR and issue management to V2 projects because I think that project statuses will be, over time, a better mechanism for managing issue work flow than labels. Here's the board we use for managing incoming contributions to help understand our workflow. We want to measure each steps to detect slow downs and optimize flow.

Do you anticipate that this action will support "time in status" for V2 projects?

I don't think this works today, so perhaps supporting this is currently blocked?

Activity

  1. zkoppert commented on Jul 20, 2023

    @zkoppert
    Collaborator

    Wow, what a great use case! Didn't even think of measuring time in a project column before. Am I correct in my understanding that when you say "time in status" that is equivalent to "time in column x on project board y"?

    I can check in on the API capabilities to see if we could add this functionality. I'll report back here when I know more!

  2. self-assigned this
    on Jul 20, 2023
  3. e0d commented on Jul 20, 2023

    @e0d
    Author

    Exactly. Columns in V2 projects can relate to status field options -- I believe this is the default.

    image

    Per project, you can represent the status options that are appropriate.

    image

    Issues and PRs can be represented on multiple projects simultaneously with different status options per board.

  4. e0d commented on Aug 16, 2023

    @e0d
    Author

    @zkoppert can you provide any context on how this is blocked or whether that situation is likely to change? We may have to undertake a fair bit of work to work around if it's going to be a while.

  5. zkoppert commented on Aug 16, 2023

    @zkoppert
    Collaborator

    Like the communities link post in the description describes, the timeline events aren't working correctly for projects. I've made a request to the team but it is not being prioritized at this time. Unfortunately I don't have a estimate on when this may be addressed but I would expect not soon.

  6. e0d commented on Aug 16, 2023

    @e0d
    Author

    Understood. Thanks for the reply it's helpful to know this isn't a priority.

  7. github-actions commented on Mar 14, 2024

    @github-actions

    This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 14 days.

  8. removed their assignment
    on Oct 9, 2024
  9. mlabeeb03 commented on Jul 16, 2025

    @mlabeeb03

    I used this script to make status_events list which is similar to the label_events list we already have. Perhaps we could use this until the API supports it?

    def get_status_events(
        issue: github3.issues.Issue, statuses: List[str] 
    ) -> List[dict[str, str|datetime]]: 
        status_events = []
        html_content = requests.get(issue.issue.html_url)._content
        soup = BeautifulSoup(html_content, 'html.parser')
        script_tag = soup.find('script', {'type': 'application/json', 'data-target': 'react-app.embeddedData'})
        json_data = {}
        if script_tag:
            json_data = json.loads(script_tag.string)
        if json_data:
            for edge in json_data["payload"]["preloadedQueries"][0]["result"]["data"]["repository"]["issue"]["frontTimelineItems"]["edges"]:
                node = edge["node"]
                if "status" in node:
                    if node["status"] in statuses:         
                        status_events.append({"createdAt": datetime.strptime((node["createdAt"]), "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc), "event": "statused", "statusName": node["status"]})
                    if node["previousStatus"] != "" and node["previousStatus"] in statuses:
                        status_events.append({"createdAt": datetime.strptime((node["createdAt"]), "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc), "event": "unstatused", "statusName": node["previousStatus"]})
        return status_events
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions