Skip to content

Latest artifacts script cannot find workflow due to pagination #7

@marcial-at-levelpath

Description

@marcial-at-levelpath

Issue

In the latest_artifacts.sh, the script tries to fetch all workflows from the given repository to extract the workflow ID of the dismiss stale approvals workflow.

If the given repository has more than 30 workflows (default page size), and the target workflow happens to be on one of the next pages, the script will fail and will always dismiss approvals, even if the code has not changed.

Solution

  1. Add a pagination loop to continue looking for the desired workflow, as long as there are more pages.
  2. Increase the page size to reduce the number of requests (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions