Urgent.News

What's breaking now, across thousands of outlets.

Tech

🦄 Sharing DEV Followers Count on Github Profile 🦄

TLDR - I finished a small project that I am sharing for my friends on DEV, that allows you to put your followers count on your Github! I had started this nonsense last year, and like many silly side projects, let it go to the wayside. But there was one consistent tiny reminder in me email everyday: "Run failed for Github Actions..." 😂 I said well, I could just delete it all. But that bothered…

A developer has created a GitHub Action that automatically updates a DEV followers count on a GitHub repository. The project, which was started last year and abandoned, has been fixed after overcoming email reminders. The author is sharing the complete GitHub Actions file to help others integrate the code without having to experience the same annoyance.

The workflow is scheduled to run daily at midnight UTC, and can also be manually triggered. It requires write permissions to the repository and uses a Node.js environment. A secret API key from DEV is required, which should not be hard-coded. Instead, the environment variable DEVTO_API_KEY should be used.

The author added tags to the README.md file to indicate where the DEV followers count should be displayed. The update script pulls the current followers count from DEV and replaces the displayed number in the README if it has changed. The updated README is then committed and pushed back to the repository.

The developer expressed excitement about getting the project working, and emphasized the importance of providing write permissions and ensuring the changes are auto-pushed. They also hinted at potential other uses for GitHub Actions to automate updates.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Wednesday 23 September →