-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: switch action and types to new configuration (#5211)
Depends-On: Mergifyio/engine#14088 Depends-On: Mergifyio/engine#14083 Change-Id: I7cddba47065c37b5ffbe9f647b6f839091301c7c
- Loading branch information
Showing
28 changed files
with
111 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
import configSchema from '../../../public/mergify-configuration-schema.json'; | ||
import configSchema from '../../../public/mergify-configuration-schema-future-version.json'; | ||
|
||
import { OptionDefinition } from './ConfigOptions'; | ||
import { OptionDefinition, Def } from './ConfigOptions'; | ||
import { OptionsTableBase } from './OptionsTable'; | ||
|
||
interface Props { | ||
/** Action's name to retrieve its options */ | ||
action: keyof typeof configSchema.$defs.Actions.properties; | ||
} | ||
|
||
export default function ActionOptionsTable({ action }: Props) { | ||
const options = configSchema.$defs.Actions.properties[action].properties as { | ||
export default function ActionOptionsTable({ def }: Def) { | ||
const options = configSchema.$defs[def].properties as { | ||
[optionKey: string]: OptionDefinition; | ||
}; | ||
|
||
return OptionsTableBase(options); | ||
return OptionsTableBase(configSchema, options); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.