Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Force upload with uncommitted files / runtime generated openapi.yaml? #1886

@Manouchehri

Description

@Manouchehri

Describe the bug
We generate our openapi-en.yaml file at runtime (but still want to track the changes in Optic), and we intentionally have the following in our .gitignore:

# OpenAPI generated files
openapi*.yaml
openapi*.json

Expected behavior
We still want to be able to use Optic to track API changes. I want Optic to use the commit hash of the current branch as the version. =)

Screenshots

Run opticdev/action@v1
Installing optic
/opt/hostedtoolcache/node/18.1[6](https://github.com/aimoda/removed-api/actions/runs/removed/jobs/removed#step:7:7).0/x64/bin/npm install --location=global @useoptic/optic
npm WARN deprecated express-graphql@0.11.0: This package is no longer maintained. We recommend using `graphql-http` instead. Please consult the migration document https://github.com/graphql/graphql-http#migrating-express-grpahql.

added 581 packages in 15s

8[7](https://github.com/aimoda/removed-api/actions/runs/removed/jobs/removed#step:7:8) packages are looking for funding
  run `npm fund` for details
/usr/bin/git fetch --deepen=1
From https://github.com/aimoda/removed-api
 * [new branch]      1-add-removed-endpoints -> origin/1-add-removed-endpoints
 * [new branch]      1-add-removed-endpoints-david -> origin/1-add-removed-endpoints-david
 * [new branch]      1-removed-endpoints-optic-1 -> origin/1-add-removed-endpoints-optic-1
 * [new branch]      2-set-project-up -> origin/2-set-project-up
 * [new branch]      main             -> origin/main
Running Optic diff-all
/opt/hostedtoolcache/node/1[8](https://github.com/aimoda/removed-api/actions/runs/removed/jobs/removed#step:7:9).[16](https://github.com/aimoda/removed-api/actions/runs/removed/jobs/removed#step:7:17).0/x64/bin/optic diff-all --compare-from HEAD~1 --check --upload --head-tag gitbranch:1-add-removed-endpoints-optic-2
No comparisons were run between specs - `optic diff-all` will run comparisons on any spec that has an `x-optic-url` key
Get started by running `optic api add` and making a change to an API spec

Additional context
Related to #1865 and #1868.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions