-
Notifications
You must be signed in to change notification settings - Fork 412
feat: Add new process and move contributors #828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@adiati98 I still need to test this again, but I think this is working. The majority of the files changed are moving the contributors to their own json file. The docs/MiGRATION_GUIDE.md explains the changes that have been made. I wanted to give you a chance to read through everything and ask questions. |
|
@BekahHW thanks so much for this! I'll test this locally and get back to you. |
|
@BekahHW I've tested this out locally and here's my thoughts: Missing Instructionsnpm installThere's no instruction anywhere to run SuggestionAdd an instruction to run
Add, commit, and push changesOnce a contributor added their JSON file, there's no instruction to add, commit, and push their changes to create a PR. For new folks in OSS, they would get confuse of what to do next after adding their JSON file. These instructions, however, are available on the terminal only if they chose to preview their profile as stated in the instruction: "5. Test locally (optional)" at SuggestionsThere are a couple of options:
I personally recommend no. 2 here. Push changesAfter running the test command — 🚀 Next steps:
1. Commit your file: git add contributors/USERNAME.json
2. Create your PR: git commit -m 'Add USERNAME as a contributor'
3. Submit and wait for merge!
4. Check the live README in 5 minutes after mergeFor folks who are new to OSS, they wouldn't know that "submit" in step 3 is to run the SuggestionsChange the instructions to be the same with when running the preview command — 🚀 Next steps:
1. git add contributors/USERNAME.json
2. git commit -m 'Add USERNAME as a contributor'
3. git push origin your-branch-name
4. Create your pull request!Profile DetailsIn the "Step-by-Step Instructions" section at 2. **Add your information**
Copy this template and fill in your details:
```json
{
"name": "Your Full Name",
"github": "your-github-username",
"profile": "https://your-website.com",
"contributions": ["code", "doc", "ideas"]
}
```We have info about available contribution types in step 3. But we don't have info what to fill for the SuggestionsAdd clear info what should be filled here. This can either their personal website or URL of their GitHub profile. Running npm CommandsThe scripts are written in Python. I don't install Python on Windows. I believe some contributors also don't have Python installed on their computer. So, for example, when I ran
SuggestionsWe can either:
Profiles on README < Contributor JSON filesBased on the below from the "Implementation Status" at **README complete** with all 310 contributors displaying correctlyBefore testing anything, I checked the profiles on README and compared them with the total JSON files in the contributors folder. Here's what I found:
The contributors' JSON files are much more than those generated on README. So, README is not complete. My wild guess here, because the README will be generated with GH Action, there's a flaw or something missing in the update-contributors workflow: NotesFYI, there's a conflict that needs to be merged as I'm writing this. I've pulled it out to test.
Test CommandRunning
Validate CommandI tested this out by adding a JSON file without one of the required field. It works, as below screenshot:
However, because there are hunderds of contributors, it's quite daunting to scroll the whole list to get to the error one. SuggestionThis is just nice to have. But it'd be great to have a print of which file is failing in the summary rather than to scroll up and try to find the error. For example: 📊 Validation Summary:
Files checked: 312
Errors: 1 (adiati98.json, ❌ Missing required field: contributions)
Warnings: 0Add and Generate Profile CommandsBased on the "contributors:generate": "all-contributors generate",
"contributors:add": "all-contributors add",I had a thought about another possibility (although I'm not too fond with this 😅). ThoughtsI'm thinking — if we want to keep everything as easy/simple as possible and only if it's possible — we can keep the ability of Running this command would:
The downside with this compare to manually add their profile that I can think of is probably if folks add their profile manually, then can learn to follow instructions, step by step. In my opinion adding things manually is a great learning process than to automate (almost) everything. I might've missed something to test here, but I want to let you know what I found so far. I've read through everything here, but I want to read one more time. Next, I will have another comment for the GH Actions workflow based on my read and understanding. |
adiati98
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BekahHW, I have some questions in the comments.
Other than these, I only have one question that I can think of atm.
In the MIGRATION_GUIDE.md:
Zero merge conflicts, even with simultaneous contributions.
I just want to confirm my understanding here. So, a contributor profile will be generated on the README after we merge the PR. Is this why there won't be any merge conflicts? Even when there are multiple PRs that we merge, say, just in a minute difference?
Is there anything else that you want me to pay more attention to and give some feedback?
I'll get back to you whenever I have other things in mind.
Thank you! ✨
| - [ ] 📝 Documentation Update | ||
| ## For New Contributors (Adding Yourself to Guestbook) | ||
|
|
||
| ## Related Issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thoughts: I feel like creating an issue and link it to the PR is one good ways to teach contributors about the importance of opening an issue when they want to add feature or fix bugs. It's also considered as one of OSS best practices, although some repos don't require this anymore for small fixes.
suggestions: Keep creating an issue as part of contributing to guestbook repo. Therefore, keep this section here, also at the course.
| ### About Me | ||
| **Name:** | ||
| **Location (optional):** | ||
| **What I'm learning:** | ||
| **Fun fact:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Do we need this section in the PR? Would it be better if we can suggest for folks to introduce themselves at GH discussion?
fix: If we want to keep this, we need some fix. The Markdown preview for this format is off because everything is inline. Let's change this to list instead.
| ### About Me | |
| **Name:** | |
| **Location (optional):** | |
| **What I'm learning:** | |
| **Fun fact:** | |
| ### About Me | |
| - **Name:** | |
| - **Location (optional):** | |
| - **What I'm learning:** | |
| - **Fun fact:** |
| contributions=$(python3 -c "import json; data=json.load(open('$file')); print(','.join(data.get('contributions', [])))") | ||
| # Validate required fields | ||
| if [ -z "$name" ] || [ -z "$github_username" ] || [ -z "$contributions" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Is profile (link to website) required? If so, we need to add it here for validation.
.github/workflows/validate-pr.yml
Outdated
| - After merge, a GitHub Action will automatically update the README | ||
| - You'll see your profile appear in the contributors section! | ||
| Thanks for being part of the open source community! 🚀`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Is it intentional to make this general? Or do you mean Open Source Communities?
| **Share your success:** | ||
| - Post about your first open source contribution on socials | ||
| - Share in the [OpenSauced Discord](https://discord.gg/U2peSNf23P) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix: This still ponting to OpenSauced Discord. We might want to point this to this repo's GH discussion.
|
|
||
| ## For New Contributors: How to Test Your Contribution | ||
|
|
||
| ### 0. Test Locally First (Recommended!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Should this start from 1?
| ## Next Steps from the Course | ||
|
|
||
| After your profile appears: | ||
| 1. 🌟 **Create a highlight** of your contribution on [OpenSauced](https://app.opensauced.pizza/feed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpenSauced is no longer available. This step needs to be removed.
| - If you wish to work on an open issue, you can comment on it and tag the maintainers. Please refrain from working on an issue before it's assigned to you. | ||
|
|
||
| In case you get stuck, feel free to ask for help in the [discussion](https://github.com/Virtual-Coffee/guestbook/discussions/categories/q-a). | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't comment on the line that's not modified. But we need to fix the link in line 23 that is still ponting to VC's discussions:
In case you get stuck, feel free to ask for help in the [discussion](https://github.com/OpenSource-Communities/guestbook/discussions).|
Yes. You should be able to merge multiple PRs quickly with no issue. It's set up like the VC Hacktoberfest issue. |
Co-authored-by: Ayu Adiati <[email protected]>
Co-authored-by: Ayu Adiati <[email protected]>



Description
This pull request introduces a new, automated, and conflict-free contributor management workflow for the guestbook repository. It adds contributor JSON files for multiple users, updates the contribution process and documentation, and implements several GitHub Actions to validate, welcome, and update contributors efficiently. The changes are grouped below by theme.
Automation and Workflow Enhancements:
.github/workflows/validate-pr.ymlto automatically validate contributor PRs, ensuring only one contributor file is added per PR, the file is correctly named, and required fields are present. It also welcomes new contributors upon PR creation..github/workflows/validate-contributors.ymlto validate contributor JSON files for structure, duplicates, and syntax on PRs and pushes..github/workflows/update-contributors.ymlto automatically update the contributors section in the README using theall-contributorsCLI whenever contributor files are added or changed..github/workflows/welcome-new-contributor.ymlto post a congratulatory comment when a contributor PR is merged.Contributor Onboarding and Documentation:
CONTRIBUTING.mdto direct users to a new step-by-step guide atdocs/guides/contributor-guide.md, clarified the process for adding oneself as a contributor, and added guidance for other contribution types. [1] [2].github/PULL_REQUEST_TEMPLATE.mdto streamline the PR process, clearly separate new contributor submissions from other PR types, and provide explicit checklists and instructions.Contributor Data Management:
.gitkeepfile to ensure thecontributorsdirectory is tracked by git and included initial contributor JSON files for several users (e.g.,02zeda.json,ATREAY.json, etc.). [1] [2] [3] [4] [5] [6] [7] [8]Minor Improvements:
intro_course_contributor.ymlto streamline messaging for course contributors.These changes collectively modernize and automate the contributor onboarding process, reduce merge conflicts, and improve the contributor experience.
What type of PR is this? (check all applicable)
Related Issues
closes #827
Added to documentation?
Screenshot (Required for PR Review)
[optional] What GIF best describes this PR or how it makes you feel?