Skip to content

CakeCrusher/linkedpush

Repository files navigation

linkedpush (site)

Converts your GitHub pushes to LinkedIn posts, to maximize exposure.

linkedpush-oauth-tictok-comp.mp4

aoc-post

How it works

Sequence diagrams

deployed

sequence-diagram deployed

master

sequence-diagram master

Setup

0. Clone this repository.

1. .env setup.

The application PORT is set to default 3000. You can change it if you want.

  1. Rename the .env-template file to .env.
  2. Expose (deploy) this repository to the internet using through whatever means you prefer. I recommend ngrok, you must initiate it to your PORT. This link will be your REDIRECT_URL, you will need it for the following steps as well.

2. Create a LinkedIn App.

  1. Create a LinkedIn developer account.
  2. Create a new app. linkedin-1
  3. Fill in the required fields (you will need a company page, you can set it up here if you don't have one).
  4. Request access to all 3 products. linkedin-2
  5. Navigate to "Auth". Add the "Client ID" and the "Client Secret" to the .env file accordingly. Add a redirect URL which will be your exposed root URL + /api/auth. "Update" the redirect URL. linkedin-3

3. Create a GitHub webhook on your repository.

  1. Navigate to your repository's settings. github-1
  2. Navigate to "Webhooks". github-2
  3. Add a new webhook. github-3
  4. Set the "Payload URL" to your exposed root URL + /api/publish. Change "Content Type" to "application/json". "Add webhook" to submit. github-4

4. linkedpush setup.

  1. Run yarn install or npm install to install the dependencies.
  2. Run yarn dev or npm run dev to start the server.
  3. Navigate to your exposed root URL + /api/auth-url.
  4. Sign in to LinkedIn and authorize the app.

5. You're set 🥳!

  1. Simply commit with the @linkedpush string in the commit text (don't worry @linkedpush will be removed from the post text).
  2. Push.
  3. Your commit message will be transformed into a LinkedIn post!

Troubleshooting

  • Your token is stored in the server's memory, so if you restart the server, you will need to re-authorize the app.
  • There are certain characters that are not allowed when posting via the API so the post will not go through. Here are some of them: \n, \r, \t, possibly more. The following characters are automatically removed by linkedpush so that the post goes through: (,),@.

About

Converts your GitHub commits to LinkedIn posts, to maximize exposure.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published