From 7a2e511910f7c42888ba73d3c9855ecfc8fc8866 Mon Sep 17 00:00:00 2001 From: Awiteb Date: Sun, 14 Jul 2024 04:54:44 +0300 Subject: [PATCH] chore: Update CONTRIBUTING.md Reviewed-on: https://git.4rs.nl/OxideTalis/oxidetalis/pulls/18 Signed-off-by: Awiteb --- CONTRIBUTING.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a1b64a8..8596660 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -122,6 +122,55 @@ ensures that the code meets the project's standards and maintains its quality. Please be open to feedback and suggestions from the project maintainers during the code review process. +## Maintainers +As a maintainer, after approving a PR, you need to pull the PR locally and then merge it manually. + +Why? Because Forgejo add some trailers to the commit message, so you need to merge it manually. + +### Pull the PR +```bash +# Replace {{pr-number}} with the PR number +git fetch origin +refs/pull/{{pr-number}}/head:refs/heads/pr-{{pr-number}} +``` + +### Merge the PR + +There is important trailers you must add it to the commit message, which is: +- `Signed-off-by: Name `: The name and email of you, the maintainer. +- `Reviewed-on: pr-url`: The URL of the PR on Forgejo. +- `Reviewed-by: Name `: The name and email of the reviewer, can be you and other reviewers (each reviewer in a new line). +- `Co-committed-by: Name `: The name and email of the PR author. +- `Reported-by: Name `: The name and email of the person who reported the issue (if any bug). +- `Suggested-by: Name `: The name and email of the person who suggested the feature (if any feature). +- `Fixes: issue-url`: The URL of the issue that the PR fixes (if any). + +Things to note: +- You can add more than one `Reviewed-by` trailer. +- You need to make sure to not commit the changes as author, you need to commit it as the author of the PR. you are the committer, not the author. +- The commit subject must be in the [Conventional Commits] format. To generate the changelog correctly. + +```bash +# Replace {{pr-number}} with the PR number +git merge --squash pr-{{pr-number}} +git commit -s --author "Name " -m "feat: Add new feature + +Reviewed-on: https://git.4rs.nl/OxideTalis/oxidetalis/pulls/{{pr-number}} +Reviewed-by: Name +Co-committed-by: Name +Reported-by: Name +" +``` + +### Push the changes +```bash +git push origin master +``` + +### Mark the PR as merged manually +Copy the full commit hash and mark the PR as merged manually on Forgejo. + +That's it! You have merged the PR manually. Thank you for your contribution! + ## License By contributing to oxidetalis, you agree that your contributions will be