https://github.com/cakecrusher/linkedpush
Converts your GitHub commits to LinkedIn posts, to maximize exposure.
https://github.com/cakecrusher/linkedpush
api devops github linkedin marketing oauth
Last synced: 7 months ago
JSON representation
Converts your GitHub commits to LinkedIn posts, to maximize exposure.
- Host: GitHub
- URL: https://github.com/cakecrusher/linkedpush
- Owner: CakeCrusher
- License: mit
- Created: 2022-10-12T00:23:01.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T01:56:11.000Z (about 3 years ago)
- Last Synced: 2023-03-10T20:27:59.759Z (almost 3 years ago)
- Topics: api, devops, github, linkedin, marketing, oauth
- Language: JavaScript
- Homepage: https://linkedpush.herokuapp.com/
- Size: 81.1 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# linkedpush ([site](https://linkedpush.herokuapp.com/))
Converts your GitHub pushes to LinkedIn posts, to maximize exposure.
https://user-images.githubusercontent.com/37946988/200144242-604c271f-534e-4859-ba87-286d290bdf54.mp4

## How it works
[Sequence diagrams](https://www.figma.com/file/KCPxw3HuMQmCsTS3MwhgaZ/linkedpush?node-id=0%3A1)
### deployed

### 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](https://ngrok.com/), 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](https://www.linkedin.com/developers/apps).

3. Fill in the required fields (you will need a company page, you can set it up [here](https://www.linkedin.com/company/setup/new/) if you don't have one).
4. Request access to all 3 products.

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.

### 3. Create a GitHub webhook on your repository.
1. Navigate to your repository's settings.

2. Navigate to "Webhooks".

3. Add a new webhook.

4. Set the "Payload URL" to your exposed root URL + `/api/publish`. Change "Content Type" to "application/json". "Add webhook" to submit.

### 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: `(`,`)`,`@`.