Files
huly-platform/services/github/pod-github
cc16352be9 Sync with foundations packages (#10703)
* fix: redesign and compact

Signed-off-by: Leonid Kaganov <lleo@lleo.me>

* fix: comments

Signed-off-by: Leonid Kaganov <lleo@lleo.me>

* fix: correctly dropping connections in timeout

Signed-off-by: Leonid Kaganov <lleo@lleo.me>

* feature: loglevel in config

Signed-off-by: Leonid Kaganov <lleo@lleo.me>

* fix: loglevel in config

Signed-off-by: Leonid Kaganov <lleo@lleo.me>

* features lopt: direct personal messages between websockets by username

Signed-off-by: Leonid Kaganov <lleo@lleo.me>

* fix collaborator security query

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>

* Fix svelte warnings

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Change log

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Add workspace permissions enum

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Add changelog

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Permission methods

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Update core and account versions

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Fix  predicate

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Add changelog

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Fix object clone

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Bump and add changelog

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Fix exception in getTypeOf

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Disable changelog check

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Fix failed to fetch errors in account client

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Clean up

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Support in-memory mode for hulypulse

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Update platform-rig

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Comment change log verification

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Update pnpm lock

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Sync with foundation

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Update platform-rig

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Sync with foundation and bump versions

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Sync with foundations

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Update and increment versions

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Skip change log verification

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Fix hulypulse connections

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Fix formatting and ci

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Fix validation warnings

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Fix formatting

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Fix validation

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Fix pnpm lock

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Update versions

Signed-off-by: Artem Savchenko <armisav@gmail.com>

* Update hulypulse version

Signed-off-by: Artem Savchenko <armisav@gmail.com>

---------

Signed-off-by: Leonid Kaganov <lleo@lleo.me>
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
Co-authored-by: Leonid Kaganov <lleo@lleo.me>
Co-authored-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
2026-03-31 10:23:56 +07:00
..
2024-07-28 14:55:43 +07:00
2026-03-27 11:35:24 +07:00
2024-07-28 14:55:43 +07:00
2024-07-28 14:55:43 +07:00
2024-07-28 14:55:43 +07:00
2025-09-16 23:18:12 +07:00
2024-07-28 14:55:43 +07:00

Github App guidelines

https://github.com/github/github-app-js-sample/tree/main

Developer resources

Forward github events to platform

  smee -u https://smee.io/Oj0ZkULovroxbFC6 -t http://localhost:3500/api/webhook

Shared application should be linked via https://github.com/apps/<app name>/installations/new?state=AB12t

https://docs.github.com/en/apps/sharing-github-apps/sharing-your-github-app

Instructions to setup GitHub integration for local testing

Register a new GitHub App

Go to Settings/Developer settings/GitHub Apps

New webhook

Go to https://smee.io/ and click Start a new channel

  • Use the provided Webhook Proxy URL as Webhook URL. Referred as WEBHOOK_URL later in the document.
  • Webhook secret is: secret
  • Keep Webhook Active checked.

Configure permissions for the app:

  • Commit statuses: Read and write
  • Contents: Read and write
  • Custom properties: Read and write
  • Discussions: Read and write
  • Issues: Read and write
  • Metadata: Read-only
  • Pages: Read and write
  • Projects: Read and write
  • Pull requests: Read and write
  • Webhooks: Read and write

Subscribe to events:

  • Issues
  • Pull request
  • Pull request review
  • Pull request review comment
  • Pull request review thread

Final creation steps

  • Create the app.
  • Generate a new client secret. Referred as POD_GITHUB_CLIENT_SECRET later in the document.
  • Create and download you private key file as well. Referred as POD_GITHUB_PRIVATE_KEY later in the document.
  • You'll be provided with your GitHub app ID. Referred as POD_GITHUB_APPID later in the document.

Forward webhook events to local server

  • Install smee client:
npm install --global smee-client
  • To forward events (keep it up and running):
smee -u {WEBHOOK_URL} -t http://localhost:3500/api/webhook

Update local config files

.vscode/launch.json —> Debug Github integration
  • "APP_ID": "{POD_GITHUB_APPID}" <— Numeric ID of the new application
  • "CLIENT_ID": "{POD_GITHUB_CLIENTID}" <—- Client ID from the new application
  • "CLIENT_SECRET": "{POD_GITHUB_CLIENT_SECRET}" <—- Client Secret from the new application
  • "PRIVATE_KEY": "{POD_GITHUB_PRIVATE_KEY}" <—- PK from the new application

Note: PK value format: "-----BEGIN RSA PRIVATE KEY-----\n {ACTUAL_KEY_WO_LINE_BREAKS}\n-----END RSA PRIVATE KEY-----

dev/prod/public/config.json
  • "GITHUB_APP": “{GITHUB_APP}" <— Textual name of the new application
  • "GITHUB_CLIENTID": “{POD_GITHUB_CLIENTID}” <— Client ID from the new application

Usage

  • Run dev GitHub pod (Debug Github integration) in vscode
  • Run dev server
  • On localhost:8080 Go to Settings -> Integrations -> Github
    • On the first tab authorise your GitHub
    • On the second tab of the dialog install the application, select a GH repo and connect to an existing/create a new connected repo in the tracker.
  • Enjoy!

Note: If the application is already installed in GitHub, make any change e.g. switch between "All repositories" and "Only select repositories" and click "Save".