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

Show deployment status on homepage #27

Open
mildronize opened this issue Aug 18, 2023 · 0 comments
Open

Show deployment status on homepage #27

mildronize opened this issue Aug 18, 2023 · 0 comments

Comments

@mildronize
Copy link
Owner

Using this REST API https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository will get all possible workflows run:

e.g.

this show when the workflow is success

{
    "total_count": 209,
    "workflow_runs": [
        {
            "id": 5903770951,
            "name": "Azure Static Web Apps CI/CD",
            "node_id": "WFR_kwLOHNr1cc8AAAABX-RlRw",
            "head_branch": "main",
            "head_sha": "ee3859864e2c33a66761ada4d7ba085c114b144f",
            "path": ".github/workflows/azure-static-web-apps.yml",
            "display_title": "revert",
            "run_number": 16,
            "event": "push",
            "status": "completed",
            "conclusion": "success",

when workflow is running

workflow_runs[0].status == "in_progress" or workflow_runs[0].status == "queued" 
workflow_runs[0].conclusion == null

When the pipeline run success, please has a confirmation dialog to refresh page.

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

No branches or pull requests

1 participant