Problem
The 5-rename-directory pipeline in bitbucket-pipelines.yml unconditionally writes the new directory name into the openicpsr: field of config.yml, regardless of the repository type.
Root Cause
In bitbucket-pipelines.yml lines 330-351, the rename pipeline:
- Sets
export openICPSRID=$newName (line 346)
- Calls
./tools/update_config.sh
- Which writes
openICPSRID into the openicpsr: field
This assumes all directories are openICPSR projects, but repositories can also be:
- Dataverse (prefix:
dv-DVN-)
- Zenodo (prefix:
zenodo-)
- OSF repositories
Example
When renaming a directory to dv-DVN-PTBWZT, the pipeline incorrectly creates:
openicpsr: dv-DVN-PTBWZT
dataverse:
Instead of:
openicpsr:
dataverse: dv-DVN-PTBWZT
Proposed Fix
The pipeline should detect the identifier type based on the directory name prefix and set the appropriate environment variable:
# Detect repository type and set appropriate variable
if [[ $newName =~ ^dv- ]]; then
export DataverseID=$newName
elif [[ $newName =~ ^zenodo- ]]; then
export ZenodoID=$newName
elif [[ $newName =~ ^osf- ]]; then
export OSFID=$newName
else
export openICPSRID=$newName
fi
Impact
This causes incorrect repository metadata in config.yml, which can affect downstream processing and reporting.
Problem
The
5-rename-directorypipeline inbitbucket-pipelines.ymlunconditionally writes the new directory name into theopenicpsr:field ofconfig.yml, regardless of the repository type.Root Cause
In
bitbucket-pipelines.ymllines 330-351, the rename pipeline:export openICPSRID=$newName(line 346)./tools/update_config.shopenICPSRIDinto theopenicpsr:fieldThis assumes all directories are openICPSR projects, but repositories can also be:
dv-DVN-)zenodo-)Example
When renaming a directory to
dv-DVN-PTBWZT, the pipeline incorrectly creates:Instead of:
Proposed Fix
The pipeline should detect the identifier type based on the directory name prefix and set the appropriate environment variable:
Impact
This causes incorrect repository metadata in
config.yml, which can affect downstream processing and reporting.