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

📚 Documentation: Update index in README.md add links for updated files and folder #53

Open
2 of 3 tasks
SagarSingh2003 opened this issue Jul 11, 2023 · 6 comments
Open
2 of 3 tasks
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Comments

@SagarSingh2003
Copy link
Collaborator

💬 Description

  • add all the links for notes and main.go files that were added recently and not present in readme

you can take reference from this readme

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🔖 Have you read the Code of Conduct?

  • Please search to see if an issue already exists for the bug or typo error you wanna add.
@SagarSingh2003 SagarSingh2003 added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers labels Jul 11, 2023
bvvnmanikanta added a commit to bvvnmanikanta/Golang-tutorial that referenced this issue Jul 17, 2023
Updated the links to Notes for Loop and Maps.
[Issue](Yashsharma1911#53)
@bvvnmanikanta
Copy link
Contributor

@SagarSingh2003, can we use github actions to auto update README.md file whenever there is a merge into main branch

@SagarSingh2003
Copy link
Collaborator Author

@SagarSingh2003, can we use github actions to auto update README.md file whenever there is a merge into main branch

great idea @bvvnmanikanta !! please go ahead and raise an issue for it ^^ .

@Yashsharma1911
Copy link
Owner

@SagarSingh2003, can we use github actions to auto update README.md file whenever there is a merge into main branch

@bvvnmanikanta how will you proceed with this? How action will know which part of Readme needs update?

@Yashsharma1911
Copy link
Owner

I don't mean to scare you with these questions just curious to know do you have any approach or you'll do research on it

@bvvnmanikanta
Copy link
Contributor

@Yashsharma1911, I checked an article that discussed dynamically updating the readme.md file. PFB sample code for updating the readme file with files list.

name: Update README

on:
  repository_dispatch:
    types: update-readme

jobs:
  update-readme:
    runs-on: ubuntu-latest

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

      - name: Generate file list
        run: |
          files=""
          for dir in */; do
            if [ -d "$dir" ]; then
              files+="- [$dir]($dir)\n"
              for file in "$dir"/*; do
                if [ -f "$file" ]; then
                  filename=$(basename "$file")
                  files+="  - [$filename]($dir$filename)\n"
                fi
              done
            fi
          done
          sed -i "s|<!-- FILE_LIST -->|$files|" README.md

      - 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 main README.md with file links"
          git push

Still need to work on it.

@Yashsharma1911
Copy link
Owner

if that is the case @bvvnmanikanta please go ahead ^^

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
Projects
None yet
Development

No branches or pull requests

3 participants