发布

  • [OPIK-3926] [CI] Fix GitHub token for automated PR workflows (#4894)

    frostbyte_neo 发布于 2026-01-27 16:29:56 +00:00

    • [OPIK-3926] [CI] Fix GitHub token for automated PR workflows

    Details

    Updated GitHub Actions workflows to use COMET_ACTION_CREATE_PR token instead of GITHUB_TOKEN for creating pull requests. This ensures automated PRs have proper permissions to be created successfully.

    What changed:

    • Replaced GITHUB_TOKEN with COMET_ACTION_CREATE_PR in workflow files
    • Affects two automated workflows: OpenAPI spec generation and daily model price updates

    Why this change:
    The default GITHUB_TOKEN has limited permissions and cannot trigger subsequent workflow runs or create PRs in certain scenarios. Using COMET_ACTION_CREATE_PR (a Personal Access Token with appropriate permissions) ensures automated PRs are created successfully and can trigger required CI/CD pipelines.

    Files modified:

    • .github/workflows/sdks_generate_openapi_spec_and_fern_code.yml
    • .github/workflows/span_cost_upload_daily.yml

    Change checklist

    • User facing
    • Documentation update

    Issues

    • Resolves #
    • OPIK-3926

    Testing

    • Workflows execute without permission errors
    • PRs are created successfully

    Documentation

    • Update GitHub workflows to include permissions for branch pushing and PR creation. Replace the token for creating pull requests with the GitHub token for better security and functionality.

    • Update GitHub workflows to remove unnecessary permissions and replace the token for creating pull requests with a more specific secret for enhanced security.

    下载附件