-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
The repo where these actions will run is being created in this ticket: #8
(It will not be stored in the cdisc-rules-engine repository.)
The workflow will be triggered by push to main.
The new repository will be a set of folders where each folder's name will be a CORE-ID like CORE-000001 (zero-padded 6 digit number). Within each directory will be a rule yaml file.
The workflow should:
- Create a non-recursive list of
NEW_DIRECTORIESfrom the branch being pushed (use tj-actions/changed-files) - Create a list of
COREIDScontaining all existing CORE-ID directory names in the main branch - Pass these lists to a "publish" python script, that does the following for each
NEW_DIRECTORIES:- If the directory name already has a CORE-ID format, skip
- Otherwise, calculate CORE-ID using one of these two algorithm (implement both so that we can select the preferred default at a later time). For now, use the min next id algorithm:
- Min next id algorithm - for example, given CORE-000001, CORE-000002, CORE-000004, min next would be CORE-000003
- Max next id algorithm - for example, given CORE-000001, CORE-000002, CORE-000004, max next id would be CORE-000005
- Change the rule yaml by setting the status to
Publishedand setting the new coreid(currently done here) - Rename the rule directory name to the generated CORE-ID
- Add the new CORE-ID to
COREIDS
- Push the update if there are any changes
Publishing is currently done by the Rule Editor here
Reactions are currently unavailable