Skip to content
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

Dynamic README with contributors name #2

Open
advaita-saha opened this issue May 20, 2023 · 7 comments · May be fixed by #16
Open

Dynamic README with contributors name #2

advaita-saha opened this issue May 20, 2023 · 7 comments · May be fixed by #16
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers GSSoC'23 Girlscript summer of Code contrib level1

Comments

@advaita-saha
Copy link
Contributor

Is your feature request related to a problem? Please describe

Contributors name no visible in readme

Describe the solution you'd like

Modify the readme along with a github workflow to add contributors name and image in the readme automatically

@advaita-saha advaita-saha added documentation Improvements or additions to documentation enhancement New feature or request GSSoC'23 Girlscript summer of Code contrib labels May 20, 2023
@nwokporochukwuebuka
Copy link

Okay. I'd like to take this up @advaita-saha

@nwokporochukwuebuka
Copy link

I'm a GSSoC contributor and with my little knowledge in documentation and documentation tools like markdown, sphinx etc I believe I can do it. I'll send a proposal of how I intent to do this.

@advaita-saha
Copy link
Contributor Author

@nwokporochukwuebuka sure go ahead

@nwokporochukwuebuka
Copy link

Here is my proposition:

Contributors Name not visible in README.md

Here is my proposition:

Contributors Name not visible in README.md

  1. Create a markdown file named CONTRIBUTOS.md file. This file would contain the names and contributors image (optional)

  2. Let it be arranged in a table format, for example

    Name Image
    Advaita Saha Avaita Saha
    Bartick Maiti Bartick Maiti
  3. Create a Github workflow file in your projects directory to update the contributors .github/workflows/update-contributors.yml

  4. Adding the following content to the workflow:

name: Update Contibutors

on:
    push:
        branches:
            - main
jobs:
    update-readme:
        runs-on: ubuntu-latest

        steps:
            - name: Checkout Repository
              uses: actions/checkout@v2

            - name: Set Up Node.js
              uses: actions/setup-node@v2
              with:
                node-version: 14

            - name: Install Dependencies
              run: npm install

            - name: Update Contributors
              run: node update-readme.js

            - name: Commit Changes
              run: |
                git config --local user.email "[email protected]"
                git config --local user.name "Github Action"
                git add README.md
                git commit -m "Update contributors in README"
                git push
  1. Create a update-readme.js file in the project's root directory and add the following code:
const fs = require('fs');

function updateMentor() {
    const contributorsContent = fs.readFileSync('CONTRIBUTORS.md', 'utf8');
    const readmeContent = fs.readFileSync('README.md', 'utf8');

    const updatedReadme = readmeContent.replace(
        /<!-- CONTRIBUTORS START -->(.|\n)*<!-- CONTRIBUTORS END -->/,
        `<!-- CONTRIBUTORS START -->\n\n${contributorsContent}\n<!-- CONTRIBUTORS END -->`
    );

    fs.writeFileSync('README.md', updatedReadme);
}

updateReadme();
  1. Anytime the push event occurs on the main. The GitHub workflow will run

@nwokporochukwuebuka
Copy link

Here is my contribution, should I go on with the process @advaita-saha

@advaita-saha
Copy link
Contributor Author

Go ahead make a PR

@nwokporochukwuebuka nwokporochukwuebuka linked a pull request May 22, 2023 that will close this issue
7 tasks
@hustler0109
Copy link

@advaita-saha Hey there's a grammatical error in the introduction section of the readme file.

The grammatically correct introduction would be "EthUnwrapped is a web application that analyzes the Ethereum blockchain and provides statistics about the usage of your blockchain. It helps you gain insights into your Ethereum activity and tracks your interactions with smart contracts, transactions, and more."

Instead of "EthUnwrapped is a web application that analyzes the Ethereum blockchain and provides statistics about (your usage of the blockchain). It helps you gain insights into your Ethereum activity and (track) your interactions with smart contracts, transactions, and more."
Please assign this issue to me under GSSOC'23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers GSSoC'23 Girlscript summer of Code contrib level1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants