From b25a7bd4882f88f88504373b7e02fb2a23e2ceff Mon Sep 17 00:00:00 2001 From: Dhairya Gothi Date: Thu, 3 Oct 2024 00:27:35 +0530 Subject: [PATCH] Changes for contributors information --- .all-contributorsrc | 15 +++++++++++ .github/workflows/add-contributors.yml | 0 .../all-contributors-auto-comment.yml | 22 ++++++++++++++++ .github/workflows/autocomment.yaml | 1 + README.md | 25 +++++++++++++++---- frontend/src/Pages/Register.jsx | 16 ++++++------ 6 files changed, 66 insertions(+), 13 deletions(-) create mode 100644 .all-contributorsrc delete mode 100644 .github/workflows/add-contributors.yml create mode 100644 .github/workflows/all-contributors-auto-comment.yml diff --git a/.all-contributorsrc b/.all-contributorsrc new file mode 100644 index 0000000..05a0ce3 --- /dev/null +++ b/.all-contributorsrc @@ -0,0 +1,15 @@ +{ + "projectName": "StationGuide", + "projectOwner": "Dhairya Gothi", + "repoType": "github", + "repoHost": "https://station-guide.vercel.app/", + "files": [ + "README.md" + ], + "imageSize": 30, + "commit": true, + "commitConvention": "gitmoji", + "contributors": [], + "contributorsPerLine": 7, + "linkToUsage": true +} diff --git a/.github/workflows/add-contributors.yml b/.github/workflows/add-contributors.yml deleted file mode 100644 index e69de29..0000000 diff --git a/.github/workflows/all-contributors-auto-comment.yml b/.github/workflows/all-contributors-auto-comment.yml new file mode 100644 index 0000000..5851302 --- /dev/null +++ b/.github/workflows/all-contributors-auto-comment.yml @@ -0,0 +1,22 @@ +name: Auto Add Contributor with All Contributors Bot + +on: + pull_request: + types: [closed] + +jobs: + add-contributor: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Create a Comment to Add Contributor + run: | + PR_AUTHOR=$(jq -r '.pull_request.user.login' < ${GITHUB_EVENT_PATH}) + curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -X POST \ + -d '{"body":"@all-contributors please add @'"$PR_AUTHOR"' for code"}' \ + "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" diff --git a/.github/workflows/autocomment.yaml b/.github/workflows/autocomment.yaml index 4739f18..243b186 100644 --- a/.github/workflows/autocomment.yaml +++ b/.github/workflows/autocomment.yaml @@ -23,6 +23,7 @@ jobs: { "body": "🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to Station Guide. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀" } + EOF ) RESPONSE=$(curl -s -o response.json -w "%{http_code}" \ diff --git a/README.md b/README.md index 0818d42..7d5d0e3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,10 @@ # STATION GUIDE : YOUR PLATFORM GUIDE + +[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-) + + +[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-) + Typing SVG welcome to repository of Station Guide @@ -90,10 +96,19 @@ StationGuide/ ├── using.md # This file └── ... # Other project configuration files (e.g., .gitignore) ``` -## Contributors ✨ -Thanks to everyone who has contributed to this project! - - Contributors - + + +## Contributors ✨ + +Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): + + + + + + + + +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! \ No newline at end of file diff --git a/frontend/src/Pages/Register.jsx b/frontend/src/Pages/Register.jsx index 5d308f2..deec131 100644 --- a/frontend/src/Pages/Register.jsx +++ b/frontend/src/Pages/Register.jsx @@ -12,12 +12,12 @@ const Register = () => { return (
-

Register New User

-
+

Register New User

+ {/* Name Input */}
- + { {/* Phone Number Input */}
- + { {/* Email Input */}
- + { {/* Password Input */}
- + { {/* Register Button */} @@ -82,7 +82,7 @@ const Register = () => { {/* Already have an account link */}

Already have an account? - + Log in