EU Parliament Monitor — API Documentation - v0.8.16
    Preparing search index...

    Function resolveUniqueFilePath

    • Resolve a unique filename by appending a numeric suffix (-2, -3, …) before the file extension when the file already exists.

      This prevents repeated workflow runs from overwriting previously committed news articles.

      Parameters

      • filepath: string

        The preferred file path (e.g. news/2026-04-02-breaking-en.html)

      Returns string

      The original path when the file doesn't exist, or a suffixed variant (e.g. news/2026-04-02-breaking-en-2.html) otherwise.