Goal:
Add or update a "merge request" (software fix) on an issue in the Drupal core project, or a contributed module, theme, or distribution project.
Skills required:
Detailed steps:
- Set up prerequisites: Log in, Local development site (optional), Git, and Git authentication from Common Prerequisites for Contributors.
- Find an issue with status Active or Needs work in the Drupal core project, or a contributed module, theme, or distribution project that you are familiar with. If the issue already has one or more "patch" files uploaded, then you should continue working on the issue using a patch instead of a merge request. If this is the case, follow the steps in the Create a patch task instead of this task write-up.
- Read the issue, making sure you understand the Problem and the Proposed Resolution sections of the issue summary, or equivalent information. If the issue summary is incomplete or outdated, see the Write an issue summary task.
- Add a comment to the issue saying that you are creating or updating the merge request for the issue.
- If an issue fork does not already exist on the issue, create an issue fork by clicking the "Create issue fork" button.
- Follow the steps in the "Cloning and committing code to an issue fork" section of the issue forks documentation to clone the repository, add the issue fork as a new remote in your local code repository, and if there isn't already a branch, create a branch.
- Edit your local code base with the changes necessary to resolve the issue, following the idea in the Proposed resolution section of the summary. Make sure to follow the Drupal project coding standards, interface text standards, and documentation standards. If you are working in the Drupal core project, the page Figuring out what Drupal core code to patch may be helpful. If the issue needs an automated test to be written, see the task writeup on automated tests.
- If you are working in the Drupal core project, check locally that the patch or merge request passes the pre-commit checks, following the steps in running core development checks.
- Commit and push your changes to the issue fork branch using Git (see the issue forks documentation page again for details on this).
- If there isn't already a merge request, create one (again, see the documentation page for details).
- Change the issue status to Needs review. Add a comment that explains the changes you made, and modify the issue summary as necessary. Click Save on the issue, to save your comment and issue field changes.