Skip to content

Add automation to prevent PRs from changing specification files that need to be immutable. #3432

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

Closed
Tracked by #3516
darrelmiller opened this issue Nov 2, 2023 · 3 comments · Fixed by #4409 or #4407
Closed
Tracked by #3516

Comments

@darrelmiller
Copy link
Member

It is very hard for people to know which specification file to update when making changes. If people do mistakenly try and change the wrong file we should prevent that and provide guidance as to which is the correct file to edit.

@kevinswiber
Copy link
Contributor

I can help with this. Which file paths would we like to restrict? Would we want an override mechanism?

@Bellangelo
Copy link
Member

This issue needs some extra clarifications. For example, what files should we forbid? Should we forbid the files that we auto-generate, like the produced JSON spec files? Also, if we need to forbid extra files, do we need to forbid them based on the branch that you are about to merge? For example, you can update 3.1.0 spec only when you are about to merge your PR in the 3.1.0-dev branch.

@ralfhandl
Copy link
Contributor

ralfhandl commented Mar 3, 2025

Partial solution in

A possible refinement is to check in the workflow whether the PR is an intra-repo "sync PR" or "release PR" and report "ok" for these.

Conditions would be

  • PR's head and base repo is OAI/OpenAPI-Specification and
    • head is main and base is dev, or
    • head is dev and base matches v?.?-dev, or
    • head matches v?.?.?-rel and base is main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment