microsoft / microsoft/generative-ai-with-javascript

feat/idea: automate achievement badges with GitHub Actions

Open
#18 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
1.3k
Forks
841
Avg merge
1d 3h
Merged PRs (30d)
1

Description

Related with #17


📌 Summary

To enhance engagement and interactivity in the repository, we can implement an automated badge system using GitHub Actions. This system will recognize contributors who complete the learning journey and award them achievement badges, displayed in a Hall of Fame inside the README.


🎯 Proposed Solution
1️⃣ Users Claim Their Badge via an Issue
  • Participants who complete the learning journey can open a new issue with the title:
    "[Badge Request] – @GitHubUsername"

  • In the issue description, they will state which achievements they have completed.

2️⃣ GitHub Action Updates the README
  • A GitHub Action will detect new issues with the [Badge Request] prefix.

  • It will automatically append the contributor’s name and badge to the Hall of Fame section in the README.

3️⃣ Example: Hall of Fame Section in README

Once the GitHub Action runs, the README will be updated dynamically:

## 🏆 Hall of Fame – AI Journey Achievers  

- @user1 - 🎖 **Time Traveler**  
- @user2 - 🏆 **Lighthouse Architect**  
- @user3 - 🤖 **AI Whisperer**  

🛠 Implementation Steps
1️⃣ Create a GitHub Action Workflow
  • Add a new workflow file at .github/workflows/add-badge.yml

  • This workflow will:

    • Detect new issues with [Badge Request] in the title.
    • Extract the GitHub username.
    • Append the username and badge to the README file.
    • Commit the updated README back to the repository.
2️⃣ Example GitHub Action Workflow (add-badge.yml)
name: Add Achievement Badge
on:
  issues:
    types: [opened]

permissions:
  contents: write

jobs:
  update-readme:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Extract GitHub username
        run: |
          echo "- @${{ github.event.issue.user.login }} - 🏆 **Achievement Unlocked**" >> README.md

      - name: Commit and push changes
        run: |
          git config --global user.name 'github-actions[bot]'
          git config --global user.email 'github-actions@github.com'
          git add README.md
          git commit -m "Added @${{ github.event.issue.user.login }} to Hall of Fame"
          git push
✅ Expected Outcome

🔹 Users can claim their achievement badges easily.
🔹 Contributors get recognition in the repository.
🔹 Encourages engagement and participation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the proposed .github/workflows/add-badge.yml workflow and the Hall of Fame section in README.md. Review the issue-opened trigger and the provided steps for extracting the username and committing the README change. Done means a matching [Badge Request] issue updates the Hall of Fame with the contributor and achievement badge.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.