Add codegen to support deprecated labels #3270
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
gore
label is deprecated in favor ofgraphic-media
. However, some moderation actions still result in thegore
label being applied. In our frontend codebase, we manually migrate thegore
label tographic-media
.Work is being done to remove the usage of this old label, but we have no definite timeline for complete removal and migration to fully eradicate historical data.
Once we do that migration, the code added in this PR will not be necessary, but:
The first commit here ports our existing logic directly into the SDK. The second commit removes that and replaces it with a new
gore
label definition that duplicatesgraphic-media
. The third is what I think is the "correct" approach, even if naming and such needs to change after we talk about this.This approach
gore
needs to duplicategraphic-media
, but we should leave some paper trail of why this is. I've added analias
field to the definitions JSON file so thatgraphic-media
can definegore
as an alias. Codegen then uses thisalias
array to generate additional definitions that duplicate the root def.Because we don't intent to support aliases, and prefer the root def, I'm also generating a tsdoc
@deprecation
comment above the alias definition.