CONTRIBUTING.md 3.0 KB

  • Fork and git clone the repo using HTTPS
  • Install and launch all the dependencies as mentioned above and open the cloned directory in an editor or IDE of your choice. The dependencies are listed below -

    • Docker
    • Download and install instructions
    • OpenProject
    • Quick install
      • docker run -it -p 8080:80 -e SECRET_KEY_BASE=secret openproject/community:11 or
    • Recommended install
      • sudo mkdir -p /var/lib/openproject/{pgdata, static}
      • docker run -d -p 8080:80 --name openproject -e SECRET_KEY_BASE=secret -v /var/lib/openproject/pgdata:/var/openproject/pgdata -v /var/lib/openproject/static:/var/openproject/assets openproject/community:11
      • docker stop openproject
      • docker start openproject
    • For up-to-date info on OpenProject installation refer their official docs.
    • Mattermost
    • docker run --name mattermost-preview -d --publish 8065:8065 --add-host dockerhost:127.0.0.1 mattermost/mattermost-preview
    • Node js
    • Download and install
  • Run sh configure.sh to create .env using bash command line. Alternatively, create a .env file using a text editor with the following entries:

    • OP_URL=http://<your host or ip address>:8080/api/v3/ #needed for pointing to OpenProject installation
    • INT_URL=http://<your host or ip address>:3000/ #needed for exposing the integration running on port 3000
    • MM_URL=http://<your host or ip address>:8065/api/v4/ #needed for pointing to Mattermost installation
    • MATTERMOST_SLASH_TOKEN=<use the mattermost slash command token for logtime> #needed for slash command validation
    • MATTERMOST_BOT_TOKEN=<use the mattermost bot access token> #needed for validation for posting messages as bot
    • OP_ACCESS_TOKEN=<openproject access token (a.k.a apikey) obtained from user account page>
  • In the project root directory do npm init to generate (or update existing) package.json file

  • Then run npm install to download and install the node modules from npm

  • Run op-mattermost in the console using npm start (usually launches on port 3000)

  • Create a custom Mattermost slash command /op as described here and provide localhost or IP address (with port 3000) as the request URL

  • In OpenProject, create a custom field billable hours under SPENT TIME head for all work packages in a project

  • Test the integration by trying /op in the message bar.

  • Make code changes to fix bugs, create new features, tests and documentation updates

  • Raise a pull request to the master branch. After review, the code changes shall be merged.

  • For detailed documentation of the project, refer the development wiki that is available here. It contains the workflows, file description and miscellaneous information necessary for development.