Skip to content
Alex B edited this page Mar 1, 2024 · 4 revisions

If you want to use this template do the following:

Initialize Git

⚠️ Do not use the "Create a new repository"-Button of the GitHub UI. It will create a new repo with a unrelated history which will cause merge problems when syncing/updating with upstream.

  1. Clone the addon-template repository locally into a new (temporary) folder
  2. Create a new (empty - with no content) GitHub repository
  3. Change the origin of the cloned repo so that points to the newly created empty GitHub repo (this might be helpful)
  4. The newly created GitHub repo should now contain the contents of this template, you can remove the temporary fodler now

Fill in the template

  • Replace intellij-plugin-template and pluginId
  • Check the Readme

Repository Settings

Some settings may require a public repository

General

  • Disable wikis (they are not used by us because the lack versioning and accessibility)
  • Disable discussions (issues are sufficient)
  • Disable projects (we have a "super"-project that already takes care of that - we don't need a separate project per repo)
  • Enable "Automatically delete head branches" (so that there are no "dead"-PR branches)
  • Enable "Limit how many branches and tags can be updated in a single push" (Up to 5)

Collaborators and teams

  • Add the corresponding Team with role Admin

Branches

  • Default branch: develop
  • Create and enable branch protection for
    • develop (Development-Branch)
    • master ("Current Release"-Branch)

Code security and analysis

  • Enable "Private vulnerability reporting"
  • Enable "Dependabot alerts"
  • Enable "Dependabot security updates"
  • Enable "Secret scanning"

Secrets and variables - Actions

Organization Secrets

These need to be added by an organization administrator

  • Required for releasing to JetBrains marketplace
    • JETBRAINS_MARKETPLACE_CERTIFICATE_CHAIN
    • JETBRAINS_MARKETPLACE_PRIVATE_KEY
    • JETBRAINS_MARKETPLACE_PRIVATE_KEY_PASSWORD
    • JETBRAINS_MARKETPLACE_PUBLISH_TOKEN
  • Required for SonarCloud integration
  • Required for updates from the template

GitHub apps

  • Install SonarCloud (required for SonarCloud integration)

Integrate SonarCloud

  • Create a new project in our SonarCloud organisation and name it exactly like the created repo name
    • Setup "New code" by using "Number of days"=30
  • Disable "Automatic Analysis" in "Administration/Analysis method"
  • To check if SonarCloud is working go to the GitHub actions Tab and execute the Sonar workflow manually
  • Check the results and possibly fix them

Repository Details

Change the Repository Details/About

  • Add a description
  • Add some Topics/Labels, e.g. intellij-plugin

Keeping up to date with the template

Once in a week a GitHub action is executed that tries to sync the changes from the template.

If changes are found a PR is created.

Check the PR changes from time to time and merge them into the develop.