@astoo/test-name-4

7.0.1 • Public • Published

github-app-test

Description

This GitHub App is a test implementation for our auto-release App. It listens to 3 GitHub webhook events (pull_request.opened, pull_request.reopened and release.created). For the two pull_request events, it just creates a PR comment to say Cool. (so cool, right?!). For the release.created event, it:

  • Create a commit with:
    • an updated package.json, with its version value changed to match with the new release.
    • an updated CHANGELOG.MD with the release description (that will mostly by automatically created) added above the other ones (but still below the title).
  • Replace the current commit (it's a merge) of the release (because it was done without those changes) and main.
  • Publish the package on NPM

App Setup

App creation

  • Go to your apps settings page.
  • Create a new App (more infos on the creation here).
  • Don't forget to fill the Webhook secret (optional) input with a long and random value (you can use 1Password, per example, to generate it) and fill the WEBHOOK_SECRET env var value with it.

App post creation settings

  • Copy your App ID (in the About section, at the begining) and fill the APP_ID env var with it.
  • Use smee for your webhook URL at first, and when you've setup a server (on Fly, per example), you can start using your own URL (like https://my-new-app.fly.dev/api/webhook).
  • Click on the Generate a private key button. It will download it automatically. Fill the PRIVATE_KEY_PATH env var with the relative path from your local repo to it. (don't forget the .pem extension).
  • Go to your App permission settings (https://github.com/settings/apps/your_app_name/permissions) and click on Repository permissions. Then, you can set:
    • Contents to Read and write
    • Pull requests to Read and write
    • Metadata should be automatically setup to Read-only
  • Install your GitHub app by following those steps

NPM Setup

  • Create an account on NPM if you don't have any.
  • Go to the token creation URL (https://www.npmjs.com/settings/<your_username>/tokens) and create a classic token with an Automation type, so it won't need the 2FA when publishing.
  • Fill the NPM_TOKEN env var with its value.

Readme

Keywords

none

Package Sidebar

Install

npm i @astoo/test-name-4

Weekly Downloads

0

Version

7.0.1

License

MIT

Unpacked Size

113 kB

Total Files

23

Last publish

Collaborators

  • astoo