leonardowf / baroneza

baroneza is a release train to automate boring tasks
10 stars 0 forks source link

Release status per project #142

Open leonardowf opened 1 year ago

leonardowf commented 1 year ago

Context:

Sometimes, tickets that are in a fix-version release of Jira are not moved to the final state of "Verified" before the release is closed.

This can be problematic for a number of reasons:

Solution:

It would be nice if there was an endpoint that could be called to list all tickets that are in a fix-version release that are not in the "Verified" state. This could be done per project, and per release.

Example:

POST /releaseStatus Body:

{
  "projectKeys": ["ABC", "DEF"],
}

Response:

{
    "releases": [
        {
            "projectKey": "ABC",
            "releaseName": "1.0.0",
            "tickets": [
                {
                    "key": "ABC-123",
                    "summary": "This is a ticket",
                    "status": "In Progress"
                },
                {
                    "key": "ABC-456",
                    "summary": "This is another ticket",
                    "status": "In Progress"
                }
            ]
        },
        {
            "projectKey": "DEF",
            "releaseName": "1.0.0",
            "tickets": [
                {
                    "key": "DEF-123",
                    "summary": "This is a ticket",
                    "status": "In Progress"
                },
                {
                    "key": "DEF-456",
                    "summary": "This is another ticket",
                    "status": "In Progress"
                }
            ]
        },
                {
            "projectKey": "DEF",
            "releaseName": "1.0.0",
            "tickets": [
                {
                    "key": "DEF-123",
                    "summary": "This is a ticket",
                    "status": "In Progress"
                },
                {
                    "key": "DEF-456",
                    "summary": "This is another ticket",
                    "status": "Ready for Test"
                }
            ]
        }
    ]
}

Additionally it would be nice if there was a way to filter the results by the status of the ticket. For example, if I only wanted to see tickets that were in the "In Progress" state.

POST: /releaseStatus BODY:

{
    "projectKeys": ["ABC", "DEF"],
    "statuses": ["In Progress", "Ready for Test", "Backlog"]
}

Response:

{
    "releases": [
        {
            "projectKey": "ABC",
            "releaseName": "1.0.0",
            "tickets": [
                {
                    "key": "ABC-123",
                    "summary": "This is a ticket",
                    "status": "In Progress"
                },
                {
                    "key": "ABC-456",
                    "summary": "This is another ticket",
                    "status": "In Progress"
                }
            ]
        },
        {
            "projectKey": "DEF",
            "releaseName": "1.0.0",
            "tickets": [
                {
                    "key": "DEF-123",
                    "summary": "This is a ticket",
                    "status": "In Progress"
                },
                {
                    "key": "DEF-456",
                    "summary": "This is another ticket",
                    "status": "Ready for Test"
                }
            ]
        },
                {
            "projectKey": "DEF",
            "releaseName": "1.0.0",
            "tickets": [
                {
                    "key": "DEF-123",
                    "summary": "This is a ticket",
                    "status": "In Progress"
                },
                {
                    "key": "DEF-456",
                    "summary": "This is another ticket",
                    "status": "Backlog"
                }
            ]
        }
    ]
}
leonardowf commented 1 year ago

Another approach would be to have the parameter specified as a repository and the status posted in a slack channel.

POST: /notifyReleaseStatus BODY:

{
    "channel": "release-status",
    "projectKeys": ["ABC", "DEF"],
    "statuses": ["In Progress", "Ready for Test", "Backlog"],
    "repository": "baroneza-test"
    "reference": 156 | ShaWindow,
}

Response: 200 ok

Dispatching a well formatted message to the specified channel