doc/development/documentation/workflow.md
The Technical Writing team uses workflows to collaborate with contributors, developers, product managers on:
The process for creating and maintaining GitLab product documentation depends on whether the documentation is:
Documentation is required for a milestone when:
Documentation is not typically required when a backend feature is added or changed.
Developers are the primary authors of documentation for a feature or feature enhancement. They are responsible for:
When possible, the merge request with the code should include the documentation. For more information, see the guidelines.
The author of this MR, either a frontend or backend developer, should write the documentation.
[!note] Community Contributors can ask for additional help from GitLab team members.
Because the documentation is an essential part of the product, if a ~"type::feature"
issue also contains the ~documentation label, you must ship the new or
updated documentation with the code of the feature.
Technical writers are happy to help, as requested and planned on an issue-by-issue basis.
For feature issues requiring documentation, follow the process below unless otherwise agreed with the product manager and technical writer:
Include any new and edited documentation, either in:
Use the documentation requirements developed by the product manager in the issue and discuss any further documentation plans or ideas as needed.
If the new or changed documentation requires extensive collaboration or conversation, a separate, linked issue can be used for the planning process.
Use the Documentation guidelines, and other resources linked from there, including:
Contact the technical writer for the relevant
DevOps stage
in your issue or merge request, or in the #docs Slack channel, if you:
If you are working on documentation in a separate merge request, ensure the documentation is merged as close as possible to the code merge.
If the feature has a feature flag, follow the policy for documenting feature-flagged issues.
All AI-generated documentation must be reviewed by a Technical Writer. Before you submit your documentation for review, run a Vale test on the documentation file to identify and fix style issues.
Generative AI tools are not a replacement for subject matter expertise. Authors are responsible for ensuring the technical accuracy of any content they create. For more information about output quality, see Communicating when using generative AI tools.
Before merging, documentation changes committed by the developer must be reviewed by:
At GitLab, we treat documentation like code. As with code, documentation must be reviewed to ensure quality. Documentation forms part of the GitLab definition of done, and should be completed before the milestone release.
Documentation is sometimes merged with a feature without a technical writer review. If not assigned for a technical writer review prior to merging, the developer or maintainer must schedule a review immediately after the merge. For this, create an issue with the Doc Review description template and add a link to the merged merge request that introduced the documentation change.
Circumstances where a post-merge technical writer review might occur are:
The technical writer can also help decide if documentation can be merged without a technical writer review, but a post-merge review must occur as soon as possible.
Product managers are responsible for the documentation requirements for a feature or feature enhancement. They can also:
For issues requiring any new or updated documentation, the product manager must:
~documentation label.Everyone is encouraged to draft the documentation requirements in the issue. However, a product manager will:
Technical writers are responsible for:
The technical writer:
~"type::feature" issues that are part of the next milestone
to get a sense of the scope of content likely to be authored.~documentation label on issues from that list which don't
have it but should, or inquires with the PM to determine if documentation is
truly required.~direction issues from that list, reads the full issue and reviews its
Documentation requirements section. Addresses any recommendations or
questions with the PMs and others collaborating on the issue to
refine or expand the Documentation requirements.By default, the developer will work on documentation changes independently, but the developer, product manager, or technical writer can propose a broader collaboration for any given issue.
Additionally, technical writers are available for questions at any time.
Technical writers provide non-blocking reviews of all documentation changes, before or after the change is merged. Identified issues that would block or slow a change's release are to be handled in linked, follow-up MRs.
Feature documentation requirements should be included as part of the issue for planning that feature in the Documentation section in the issue description. Issues created using the Feature Proposal template have this section by default.
Anyone can add these details, but the product manager who assigns the issue to a specific release milestone will ensure these details are present and finalized by the time of that milestone's kickoff.
Developers, technical writers, and others may help further refine this plan at any time on request.
The following details should be included:
Currently, the Technical Writing team strongly encourages including documentation in the same merge request as the code that it relates to, but this isn't strictly mandatory. It's still common for documentation to be added in an MR separate from the feature MR.
Engineering teams may elect to adopt a workflow where it is mandatory that documentation is included in the code MR, as part of their definition of done. When a team adopts this workflow, that team's engineers must include their documentation in the same MR as their feature code, at all times.
A workflow that has documentation separated into its own MR has many downsides.
If the documentation merges before the feature:
If the documentation merges after the feature:
Having two separate MRs means:
Documentation quality might be lower, because:
Including documentation with code (and doing it early in the development process) has many benefits:
To have documentation included with code as a mandatory workflow, some changes might need to happen to a team's current workflow:
You can visualize the parallel workflow for code and documentation reviews as:
graph TD
A("Feature MR Created (Engineer)") --> |Assign| B("Code Review (reviewer)")
B --> |"Approve / Reassign"| C("Code Review (maintainer)")
C --> |Approve| F("Merge (maintainer)")
A --> D("Docs Added (Engineer)")
D --> |Assign| E("Docs Review (Tech Writer)")
E --> |Approve| F
For complex features split over multiple merge requests:
Do not use HTML comments to hide documentation that was added before the feature was ready, that is unfinished, or for other similar reasons. Hiding documentation is problematic for several reasons:
If documentation needs to be removed because it was added prematurely, delete it. In the merge request that removes the content, add a link to the merge request that added it originally. If it's needed in the future, you can use Git history, or the earlier MR, to recover the content and add it back.
To avoid documentation being added prematurely, development teams should consider including documentation with the code.
A product designer should consult the technical writer for their stage group when planning to add or change UI text.
The technical writer can offer an initial review of any ideas, plans, or actual text. The technical writer can be asked to draft text when provided with the context and goal of the text. The context might include where the text would appear and what information to convey, which typically answers one or more of these questions:
Consider tagging the technical writer once in a review request with a message indicating where reviews are needed. This will help manage the volume of notifications per review round.
After the merge request is created, all changes and additions to text in the UI must be reviewed by the technical writer. These might include labels (buttons, menus, column headers, and UI sections) or any phrases that would be displayed in the UI, such as microcopy or error messages.
<i class="fa-youtube-play" aria-hidden="true"></i> For more information about writing and reviewing UI text, see Copy That: Helping your Users Succeed with Effective Product Copy.
<!-- Video published on 2016-05-26 -->The CI/CD pipelines for the gitlab and gitlab-runner projects are configured to
run shorter, faster pipelines on merge requests that contain only documentation changes.
If you submit documentation-only changes to omnibus-gitlab, charts/gitlab, or gitlab-operator,
to make the shorter pipeline run, you must follow these guidelines when naming your branch:
| Branch name | Valid example |
|---|---|
Starting with docs/ | docs/update-api-issues |
Starting with docs- | docs-update-api-issues |
Ending in -docs | 123-update-api-issues-docs |
Changes to these files in the gitlab project automatically trigger a long pipeline
because some code tests use these files as examples:
doc/_index.mddoc/api/settings.mdWhen you edit these pages, the long pipeline appears the same as in a code MR, but you do not need any additional approvals. For more information on long pipelines, see pipelines for the GitLab project.
If the pre-merge-checks job fails with messages about tier-3 pipelines or predictive pipelines,
follow these steps:
~"pipeline::tier-3" and ~"pipeline:mr-approved" labels to the MR.To avoid running long pipelines while working on an MR, you can push a commit without triggering a pipeline. For more information, see skip a pipeline.
When you move content to a new location, and edit the content in the same merge request, use separate commits.
Separate commits help the reviewer, because the MR diff for moved content does not clearly highlight edits. When you use separate commits, the reviewer can verify the location change in the first commit diff, then the content changes in subsequent commits.
For example, if you move a page, but also update the content of the page:
You can add as many commits as you want, but make sure the first commit only moves the content, and does not edit it.
The Technical Writing team uses the following labels on issues and merge requests:
~"type::feature"~"type::maintenance" with ~"maintenance::refactor"~devops::create~group::source code~documentation specialization label.~Technical Writing team label.The documentation merge request template includes some of these labels.
Any issue or merge request a technical writer works on must include the Technical Writing label.
To further classify the type of effort, include one or more of the following labels:
Category:Docs Site: Documentation website infrastructure or code. This is not needed for issues related to the documentation itself. Issues with this label are included on the Docs Workflow issue board.development guidelines: Files in the /developer directory.docs-feedback: Feedback from the docs feedback widget, survey verbatims, or customer-created issues.docs-missing: Documentation for a feature is missing. Documentation is required with the delivery of a feature for a specific milestone as part of the GitLab definition of done. Add this label to the original feature MR or issue where documentation is missing. Keep the label for historical tracking and use tw::finished to indicate when documentation is completed. Does not apply to experiment features.documentation: Files in the /doc directory.global nav: Left nav of the docs site. Used in the docs-gitlab-com project.L10N-docs: Localization issue, MR, or epic that impacts the workflows of the Technical Writing team or the docs.gitlab.com site and infrastructure.release post item: Release post items.Technical Writing Leadership: Work driven or owned by the Technical Writing leadership team, such as OKRs.tw-lead: MRs that are driven by or require input from one of the stage leads.tw-style: Style standards for documentation and UI text.UI text: Any user-facing text, such as UI text and error messages.Other documentation labels include vale, docs-only, and docs-channel. These labels are optional.
All issues and merge requests to projects that are part of the product must be labeled with a work type. Handbook and Marketing site changes do not require the work type label. Add one of the following labels to an issue or merge request:
type::featuretype::bugtype::maintenanceFor more information, see work type classification.
The majority of documentation work uses the type::maintenance label.
You must also apply one of these subtype labels to further classify the type of maintenance work:
maintenance::refactor: Edits and improvements of existing documentation.maintenance::workflow: Documentation changes that are not visible to readers, like linting and tooling updates, and metadata changes.For example, if you open a merge request to refactor a page for CTRT, apply the type::maintenance and maintenance::refactor labels.
If you open a merge request to modify the metadata, apply the type::maintenance and maintenance::workflow labels.
Writers can use these labels to describe the status of their work in an issue or merge request:
tw::doingtw::finishedThe technical writer who authors content usually adds the tw::doing label,
and the technical writer who does the review usually adds the tw::finished label.
For content submissions from community contributors,
the technical writer would add both labels as part of their review.
The workflow is:
tw::doing label while actively working.
tw::doing label.tw::doing label again.tw::finished label.The tw::finished label indicates that the writer is done with an issue or merge request
they are not closing or merging.
If the Technical Writing team is closing or merging, the issue or merge request
status overrides the scoped tw label status. The technical writer does not have to
use the tw::finished label.
If a technical writer is presented with an open issue or merge request with a
tw::finished label that needs more work, the writer should
re-add the tw::doing scoped label.
The technical writer for each stage group reviews their group's feature blocks (release post items) authored by the product manager.
For each release, a single technical writer is also assigned as the Technical Writing Lead to perform the structural check and other duties.
When a new GitLab version is released, the Technical Writing team releases version-specific published documentation.
To make a documentation change that is not associated with a specific code change, the Technical Writing team encourages contributors to create an MR.
If you start with an issue rather than an MR, use the documentation template. For the labels you should apply, see labels.
Also include:
Backlog until the work is scheduled for a milestone.None until the work is scheduled for a milestone.
In the issue description or comments, mention (@username) the technical writer assigned to the group for awareness.Docs: or Docs feedback:Seeking community contributions and quick win.If an issue requires input from the development team before a technical writer can start work, it should follow the stage and group's issue lifecycle. For an example of an issue lifecycle, see Plan stage issues.
Technical writers use issue boards to routinely review and triage documentation feedback and improvement issues for their groups. This helps us prioritize on actionable issues that improve the user experience.
To create an issue triage board for your group:
Create an issue board called Docs only backlog triage - group name.
Enter the following filter criteria:
Label=documentation, Label="group::groupname", Label!="type::feature", Label!="type:bug"
In Edit board, ensure Show the Open list is selected.
On the issue board, select Create list, and set the label to tw:triaged.
See an example board for the Project Management group.
To review and triage documentation feedback and improvement issues for your groups:
The documentation under /doc/solutions is created, maintained, copy edited,
and merged by the Solutions Architect team.
The Technical Writing team takes part in the GitLab Hackathon and sometimes hosts a documentation-only Hackathon.
We often create documentation issues for a Hackathon. These issues are typically based on results found when you run Vale against the documentation.
Run Vale against the full docset. Go to the GitLab repo and run:
find doc -name '*.md' | sort | xargs vale --minAlertLevel suggestion --output line > ../results.txt
Create issues. You have a few options:
Doc cleanup issue template.Doc cleanup issue template.Ensure that the labels assigned to the issues match those in the Doc cleanup issue template.
To assign an issue to a community contributor:
Seeking community contributions label./assign @username in a comment, where @username is the contributor's handle.Try to limit each contributor to no more than three issues at a time. You can assign another issue as soon as they've opened an MR for one of the issues they're already assigned.
When a community contributor opens a Hackathon merge request:
View the related issue. Ensure the user who authored the MR is the same user who asked to be assigned to the issue.
Work to merge the merge request.
When you merge, ensure you close the related issue.