A serverless function that auto commits your daily total time tracked on Wakatime to Github.

Overview

Wakatime Stats Github Commit

Auto commit your daily total time tracked on Wakatime to Github. Using Netlify Scheduled Functions, Github GraphQL API, and Wakatime API.

Setup

  1. Fork this repository.

  2. You'll need a WakaTime API Key, which you can get from your WakaTime Account Settings. Store the token somewhere secure, we'll need it shortly.

  3. You'll need a GitHub Personal Access Token with repo and admin:repo_hook scope which can be generated here. Store the token somewhere secure, we'll need it shortly.

  4. Import Repo to Netlify - Go to the Netlify Dashboard page, Click the Add New Site > Import An Existing Project > GitHub button. Authorize the app to access your GitHub account then choose the cloned repo. Add required environment variables, Click the Show Advanced > New Variable button. Add these variables:

WAKATIME_API_KEY=<your-wakatime-api-key>
GITHUB_ACCESS_TOKEN=<your-github-access-token>
REPO_NAME=<the-cloned-repo-name>
GITHUB_USERNAME=<your-github-username>

Then click the Deploy Site button. Go to the Functions tab of the dashboard and click the Enable Scheduled Functions button. After a few seconds, your function should be successfully deployed.

Local Development

# Install the Netlify CLI
npm install -g netlify-cli.

# Login to netlify
netlify login

# Clone the repository and navigate to project directory
git clone

# Start the functions server
netlify functions:serve

# Function will be available at
http://localhost:9999/.netlify/functions/log-tracked-time


# For typescript project, before committing the files, run:
tsc --noEmit

TODO

  • Filter duplicate dates
You might also like...

Easily open daily notes and periodic notes in new pane; customize periodic notes background; quick append new line to daily notes.

Easily open daily notes and periodic notes in new pane; customize periodic notes background; quick append new line to daily notes.

Obsidian daily notes opener This plugin adds a command for opening daily notes in a new pane (so that a keyboard shortcut could be used!) and gives ex

Dec 26, 2022

A simple daily news, used the api of Zhihu Daily, deployed on Vercel.

Daily News Introduction | 介绍 A simple daily news website, used the api of Zhihu Daily, deployed on Vercel. Inspired by @zkeq/news. 一个简单的,使用知乎日报api的,部署

Jul 26, 2022

Learn Web 2.0 and Web 3.0 Development using Next.js, Typescript, AWS CDK, AWS Serverless, Ethereum and AWS Aurora Serverless

Learn Web 2.0 Cloud and Web 3.0 Development in Baby Steps In this course repo we will learn Web 2.0 cloud development using the latest state of the ar

Jan 3, 2023

A Serverless GraphQL Sample project using Apollo and Serverless Framework with TypeScript and Webpack.

Serverless GraphQL Boilerplate This is a base project with a structure that includes Serverless Framework, Apollo, TypeScript and Webpack. It can be d

Aug 23, 2022

AWS Lambda & Serverless - Developer Guide with Hands-on Labs. Develop thousands line of aws lambda functions interact to aws serverless services with real-world hands-on labs

AWS Lambda & Serverless - Developer Guide with Hands-on Labs. Develop thousands line of aws lambda functions interact to aws serverless services with real-world hands-on labs

AWS Lambda & Serverless - Developer Guide with Hands-on Labs UDEMY COURSE WITH DISCOUNTED - Step by Step Development of this Repository - https://www

Dec 17, 2022

Lecture by lecture commits of the https://www.udemy.com/build-blockchain-full-stack/ course

Commit-by-commit breakdown of "Build a Blockchain & Cryptocurrency | Full-Stack Edition" This is a commit-by-commit breakdown of "Build a Blockchain &

Dec 12, 2022

serverless plugin to setup custom domain for lambdas deployed with function url.

serverless-aws-function-url-custom-domain Automatically creates AWS CloudFront distribution and Route 53 records to AWS Lambda with Function URL (no a

Nov 27, 2022

A quickstart AWS Lambda function code generator. Downloads a template function code file, test harness file, sample SAM deffiniation and appropriate file structure.

Welcome to function-stencil 👋 A quickstart AWS Lambda function code generator. Downloads a template function code file, test harness file, sample SAM

Jun 20, 2022

Tries to execute sync/async function, returns a specified default value if the function throws

good-try Tries to execute sync/async function, returns a specified default value if the function throws. Why Why not nice-try with it's 70+ million do

Dec 8, 2022
Comments
  • Functions not working

    Functions not working

    On my function options, from my Netlify Dashboard, i don't see anything such as "Enable Scheduled Functions"

    Also i tried to navigate to the Given Function Endpoint: this url: https://famous-crisp-9a6da9.netlify.app/.netlify/functions/log-tracked-time

    I ran into this error below,

    {"error":{"response":{"data":{"repository":null},"errors":[{"type":"NOT_FOUND","path":["repository"],"locations":[{"line":3,"column":5}],"message":"Could not resolve to a Repository with the name 'adebayo-moses/https://github.com/adebayo-moses/wakatime-github-commit'."}],"status":200,"headers":{}},"request":{"query":"\n query Repo($owner: String!, $repo: String!) {\n repository(name: $repo, owner: $owner) {\n defaultBranchRef {\n name\n target {\n ... on Commit {\n history(first: 1) {\n nodes {\n oid\n }\n }\n }\n }\n }\n }\n }\n","variables":{"owner":"adebayo-moses","repo":"https://github.com/adebayo-moses/wakatime-github-commit"}}}}

    opened by adebayo-moses 1
Owner
Yinka Adedire
Frontend developer interested in Jamstack
Yinka Adedire
Converts your GitHub commits to LinkedIn posts, to maximize exposure.

linkedpush (site) Converts your GitHub pushes to LinkedIn posts, to maximize exposure. linkedpush-dep-tictok.mp4 How it works Sequence diagram Setup 0

Sebastian Sosa 8 Dec 3, 2022
Uptime monitoring RESTful API server that allows authenticated users to monitor URLs, and get detailed uptime reports about their availability, average response time, and total uptime/downtime.

Uptime Monitoring API Uptime monitoring RESTful API server that allows authenticated users to monitor URLs, and get detailed uptime reports about thei

Mohamed Magdi 2 Jun 14, 2022
Wrap a function with bun-livereload to automatically reload any imports inside the function the next time it is called

bun-livereload Wrap a function with bun-livereload to automatically reload any imports inside the function the next time it is called. import liveRelo

Jarred Sumner 19 Dec 19, 2022
Testing how many commit can be committed to GitHub. So far 12,225,265 commits

GitHub's Commit Capacity. Motivation Checking some relations and capabilities between client-server model, GitHub & Git. Goal Making this repo most co

Recep Öztürk 6 Mar 25, 2022
GitHub Action to validate that PR titles in n8n-io/n8n match n8n's version of the Conventional Commits spec

validate-n8n-pull-request-title GitHub Action to validate that PR titles in n8n-io/n8n match n8n's version of the Conventional Commits spec. Setup Cre

Iván Ovejero 2 Oct 7, 2022
A daily activity tracking application that helps to organize your daily tasks and keep track of tasks that have been completed, or yet to be completed.

To-Do-List This is my To-Do List project in the Microverse curriculum. Built With HTML CSS Javascript (Webpack) GitHub Live Demo Live Demo Link Gettin

Hammed Adisa 8 May 7, 2022
Total Quest is an online real-world scavenger hunt application built with the MERN stack

TOTAL QUEST Table of Contents Description Team Members Technologies Used Contact Example Link to Total Quest Description Total Quest is an online real

Mark Drummond 4 Mar 13, 2022
A mobile web application to check the data on the total covid19 confirmed cases and deaths, check data for all countries with recorded cases.

This is a mobile web application to check the data on the total covid19 confirmed cases and deaths, check data for all countries with recorded cases. It also has a details page to check for the statistics for each region/state if available.

Solomon Hagan 7 Jul 30, 2022
Starting point for total web3.0 beginners.

Web3.0 for total beginners Things to begin with First read this Medium article about web3.0 How does Ethereum work, anyway? Then take a look to this v

Bozidar Zecevic 19 Aug 30, 2022