GreenCode Sentiment Hub

This is a submission for the Pulumi Deploy and Document Challenge: Shhh, It's a Secret! What I Built I built GreenCode Sentiment Hub, a full-stack MERN app that analyzes GitHub pull requests for sentiment and environmental impact. The frontend side lets users input their GitHub Personal Access Token (PAT) and repo details, while the backend (Node.js/Express) fetches PR data, uses Hugging Face’s API to assess sentiment, and calculates a carbon impact score based on code changes. It then updates PRs with labels like "Positive" or "Critical" and comments like "Green Code!" for eco-friendly changes. Deployed on Render (backend) and Netlify (frontend), it uses MongoDB Atlas for storage and WebSockets for real-time updates. Live Demo Link Full Web App: https://greencode-sentiment.netlify.app Youtube: https://youtu.be/UcdxpkgVb6o Project Repo https://github.com/Soham-0047/Pulumi-github-analysis.git My Journey I started wanting to use Pulumi’s Automation API to manage GitHub resources, but hit roadblocks and ended up with a simpler, CLI-free solution. I aimed for a no-CLI setup, but the Automation API kept demanding pulumi version, throwing errors like crazy. Regenerated my PAT with repo scope, tested it, and boom—labels started sticking. I ditched the Automation API and used axios to hit GitHub’s REST API directly—less fancy, but it worked! Using Pulumi ESC I leveraged Pulumi ESC to securely manage my app’s sensitive data—specifically, the Hugging Face API key for sentiment analysis. created an ESC environment in Pulumi Cloud. I used the @pulumi/esc-sdk to fetch the key at runtime. It provided a centralized, encrypted way to manage secrets, which was a lifesaver when deploying to Render. I didn’t use Pulumi Copilot (the AI assistant) since my focus was on manual configuration, but ESC alone proved its worth by keeping my secrets safe and accessible Above image created by AI

Apr 6, 2025 - 13:05
 0
GreenCode Sentiment Hub

This is a submission for the Pulumi Deploy and Document Challenge: Shhh, It's a Secret!

What I Built

I built GreenCode Sentiment Hub, a full-stack MERN app that analyzes GitHub pull requests for sentiment and environmental impact. The frontend side lets users input their GitHub Personal Access Token (PAT) and repo details, while the backend (Node.js/Express) fetches PR data, uses Hugging Face’s API to assess sentiment, and calculates a carbon impact score based on code changes. It then updates PRs with labels like "Positive" or "Critical" and comments like "Green Code!" for eco-friendly changes. Deployed on Render (backend) and Netlify (frontend), it uses MongoDB Atlas for storage and WebSockets for real-time updates.

Live Demo Link

Project Repo

My Journey

I started wanting to use Pulumi’s Automation API to manage GitHub resources, but hit roadblocks and ended up with a simpler, CLI-free solution. I aimed for a no-CLI setup, but the Automation API kept demanding pulumi version, throwing errors like crazy. Regenerated my PAT with repo scope, tested it, and boom—labels started sticking. I ditched the Automation API and used axios to hit GitHub’s REST API directly—less fancy, but it worked!

Using Pulumi ESC

I leveraged Pulumi ESC to securely manage my app’s sensitive data—specifically, the Hugging Face API key for sentiment analysis. created an ESC environment in Pulumi Cloud. I used the @pulumi/esc-sdk to fetch the key at runtime. It provided a centralized, encrypted way to manage secrets, which was a lifesaver when deploying to Render. I didn’t use Pulumi Copilot (the AI assistant) since my focus was on manual configuration, but ESC alone proved its worth by keeping my secrets safe and accessible

Above image created by AI