Improve tw:codeowners task
What does this MR do and why?
This improves the tw:codeowners
rake task by grouping the entries for a directory if it is fully owned by the same writer. Also removes the leading .
as I have read it has to be removed manually.
I think the way I solved this problem is probably not really the "Ruby Way of doing things" and probably also not the most efficient way so I'm happy for feedback in the review!
Screenshots or screen recordings
Example: Single file directories and jira
were grouped without entries for each file
How to set up and validate locally
bin/rake tw:codeowners > tmp/_tw
- View the
tmp/_tw
file
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
technical-writing#598 (closed) describes the process of using this task (as example the dot stripping)
Related issues
These issues and MRs describe the evolution of the CODEOWNERS project for the Technical Writing team, from the initial idea through multiple (!) iterations to a finished product. These links may have been added significantly after this issue or merge request was closed, so they may describe parts of the process before or after this work.
- Related to Create rake task for docs CODEOWNERS (!77715 - merged) where Amy had an idea
- Related to Update CODEOWNERS to include TW assignments for... (!77606 - merged) where we asked for the raw output of the Rake task to be added into the CODEOWNERS file. This rake task would give the TW team a way to periodically generate a full list of owned pages.
- Related to Expand CODEOWNERS with more documentation DRIs (#349587 - closed) where Marcel noted many pages needed a DRI declared
- Related to Update CODEOWNERS to include TW assignments for... (!77606 - merged) where we started manually shortening the results
- Related to Refine how to run batch updates for the CODEOWN... (technical-writing#668 - closed) where we started figuring out how to run batch updates
- Related to Codeowners: Assign TW with more than 50% page o... (#375783 - closed) where we started automating the process of shortening and condensing the results
- Related to Document tw::codeowners rake task (technical-writing#598 - closed) where we documented the task
- Related to Create custom stage / group for tutorials section (technical-writing#672 - closed) where we had to find alternate assignments for part of the docset that is owned, but not by a stage/group
- Related to Release Post 15.7 MVP Nominations (gitlab-com/www-gitlab-com#14283 - closed) where Niklas was nominated as MVP for the months of iteration needed to bring this script to a full, workable state
/cc @aqualls as you wrote the initial rake task
Related to Refine how to run batch updates for the CODEOWN... (technical-writing#668 - closed)