-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Currently, all comparisons are done against the full text of the sha in the json objects vs the old sha in the commit-map. While this is valid for specified sha json object fields, there are certain raw text fields in GitHub that will reference short shas. An example would be in the body of an issue where the author can specify the full sha 7b72e8e the short sha 7b72e8e or anything in between 7b72e8e and GitHub will link to that commit. Anything less than 7 chars is considered not unique enough, and won't be linked 7b72. I would propose:
- Identify raw text fields in the metadata files (ex: issue body text) that should be replaced
- Add an optional bool flag
--replace-text, -rdefaulted tofalsethat would give users the option whether to replace shas in these fields - Change the comparison to only compare the first 7 chars of a metadata sha field with the first 7 chars of the commit-map sha field, and replace the value equal to the length of metadata sha with the equivalent length of the old sha
- Split the metadata text fields (probably on non-hex characters?) and compare the first 7 chars of each value with the first 7 of the old sha and replace the value equal to the length of metadata sha with the equivalent length of the old sha
Metadata
Metadata
Assignees
Labels
No labels