Challenge Description
Write a script that automatically leaves a comment on a contributor PR.
Comment:
This comment should be as the following:
{Github username} 👍 Thank you for raising your pull request and contributing to our Community Please make sure you have followed our contributing guidelines. We will review it as soon as possible. If you encounter any problems, please feel free to connect with us.
Requirements
- Create a Github repository.
- Initialize Next.js project.
- Push the code to Github repository.
- Create a new branch locally.
- Update README.md with "Updating this to test the PR comment".
- Push to the new branch.
- Create a PR to the main branch. When you do this, there should be a comment on your PR.
You are expected to use Danger.js to comment on your PR.
Explanation
When you submit a PR to an open source project, it is quite common to see a comment thanking you.
Examples
-
Lobechat You will see the following comment upon submitting your PR:
-
Twenty You will see the following comment upon submitting your PR:
Note:
I recommend you to read the following to understand more about how danger.js is configured in Twenty and Lobechat source to figure out how they do it:
- https://thinkthroo.com/blog/dangerfile-ts-in-twenty-the-1-open-source-crm
- https://github.com/twentyhq/twenty/blob/main/packages/twenty-utils/dangerfile.ts
- https://github.com/twentyhq/twenty/pull/12937
- https://danger.systems/js/reference
- https://www.npmjs.com/package/danger-plugin-todos