{"id":13753947,"url":"https://github.com/fabric8-services/fabric8-wit","last_synced_at":"2025-05-09T21:36:13.285Z","repository":{"id":56349221,"uuid":"54260706","full_name":"fabric8-services/fabric8-wit","owner":"fabric8-services","description":"wit stands for Work Item Tracker","archived":true,"fork":false,"pushed_at":"2020-02-25T22:58:51.000Z","size":14559,"stargazers_count":45,"open_issues_count":193,"forks_count":86,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-11-16T06:31:13.171Z","etag":null,"topics":["goa","golang","jsonapi","microservice","webservice"],"latest_commit_sha":null,"homepage":"http://devdoc.almighty.io/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabric8-services.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2016-03-19T10:42:15.000Z","updated_at":"2023-01-28T10:11:01.000Z","dependencies_parsed_at":"2022-08-15T17:01:15.160Z","dependency_job_id":null,"html_url":"https://github.com/fabric8-services/fabric8-wit","commit_stats":null,"previous_names":["almighty/almighty-core"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabric8-services%2Ffabric8-wit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabric8-services%2Ffabric8-wit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabric8-services%2Ffabric8-wit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabric8-services%2Ffabric8-wit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabric8-services","download_url":"https://codeload.github.com/fabric8-services/fabric8-wit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253329062,"owners_count":21891570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["goa","golang","jsonapi","microservice","webservice"],"created_at":"2024-08-03T09:01:35.453Z","updated_at":"2025-05-09T21:36:12.409Z","avatar_url":"https://github.com/fabric8-services.png","language":"Go","funding_links":[],"categories":["webservice"],"sub_categories":[],"readme":"= Fabric8 Work Item Tracker\n:toc:\n:toc-placement: preamble\n:sectnums:\n:experimental:\n\nimage:https://ci.centos.org/buildStatus/icon?job=devtools-fabric8-wit-build-master[Jenkins,link=\"https://ci.centos.org/view/Devtools/job/devtools-fabric8-wit-build-master/lastBuild/\"]\nimage:https://goreportcard.com/badge/github.com/fabric8-services/fabric8-wit[Go Report Card, link=\"https://goreportcard.com/report/github.com/fabric8-services/fabric8-wit\"]\nimage:https://godoc.org/github.com/fabric8-services/fabric8-wit?status.png[GoDoc,link=\"https://godoc.org/github.com/fabric8-services/fabric8-wit\"]\nimage:https://codecov.io/gh/fabric8-services/fabric8-wit/branch/master/graph/badge.svg[Codecov.io,link=\"https://codecov.io/gh/fabric8-services/fabric8-wit\"]\n\nWork Items describe and keep track of work that needs to be done. A user can be assigned to a Work Item. Each Work Item must be attached to a Collaboration Space and an Area (assigned by default). This can be used to model bugs, tasks, features, ideas, and more.\n\n== Building from source [[building]]\n\nThe following guide is mainly targeted towards a Linux or Mac OSX development\nmachine. If you are on Windows, we recommend to take a look at\nlink:docs/development/getting-started-win.adoc[Getting started with fabric8-wit development on Windows].\n\n=== Prerequisites [[prerequisites]]\n\nYou need to install:\n\n* `go` (\u003e= v1.8)\n* `git`\n* `mercurial`\n* `make`\n\n==== Check your Go version [[check-go-version]]\n\nRun the following command to find out your Go version.\n\n----\n$ go version\n----\n\n*You must at least have Go version 1.8.*\n\nSee \u003c\u003cfetch-dependencies\u003e\u003e to see an explanaition on how we deal with\ndependencies.\n\n==== Install dep [[dep-setup]]\n\nThis project uses https://github.com/golang/dep[dep] as a package manager for Go.\nRunning the `make deps` command will install `dep` in `$GOPATH/bin` if it's not already available on your system.\n\n=== Get the code [[get-the-code]]\n\nAssuming you have Go installed and configured (have `$GOPATH` setup and\npointing to a single directory) here is how to build.\n\nCheck out the code\n\n----\n$ git clone https://github.com/fabric8-services/fabric8-wit $GOPATH/src/github.com/fabric8-services/fabric8-wit\n----\n\n=== Build [[build]]\n\nLike most other projects, this one depends on various other projects that need\nto be downloaded.\n\nWe also generate some code from design files that shall make it into our\nfinal artifacts.\n\nTo fetch the dependencies, generate code and finally build the project you can\ntype `make` in a freshly clone repository of this project.\n\n----\n$ cd $GOPATH/src/github.com/fabric8-services/fabric8-wit\n$ make\n----\n\n==== Special make targets\n\nThere is no need to fetch the dependencies, or re-generate code every time you\nwant to compile. That's why we offer special `make` targets for these topics:\n\n * \u003c\u003cfetch-dependencies\u003e\u003e\n * \u003c\u003cgenerate-code\u003e\u003e\n * \u003c\u003cbuild\u003e\u003e\n * \u003c\u003cclean\u003e\u003e\n * \u003c\u003ctest\u003e\u003e\n * \u003c\u003ccoverage\u003e\u003e\n\n===== Fetch dependencies [[fetch-dependencies]]\n\nThis will download all the dependencies for this project inside a directory\ncalled `vendor`. This way we can ensure that every developer and our CI system\nis using the same version.\n\n----\n$ cd $GOPATH/src/github.com/fabric8-services/fabric8-wit\n$ make deps\n----\n\nFor dependency management of `go` packages we use https://github.com/golang/dep[`dep`].\nThe file `Gopkg.toml` contains all dependencies. If you want to\nunderstand the format for this file, look link:https://golang.github.io/dep/docs/Gopkg.toml.html[here].\n\n===== Generate GOA sources [[generate-code]]\n\nYou need to run this command if you just checked out the code and later if\nyou've modified the designs.\n\n----\n$ cd $GOPATH/src/github.com/fabric8-services/fabric8-wit\n$ make generate\n----\n\n===== Build [[build]]\n\nIf you want to just build the ALM server and client, run `make build`.\n\n----\n$ cd $GOPATH/src/github.com/fabric8-services/fabric8-wit\n$ make build\n----\n\n===== Clean [[clean]]\n\nThis removes all downloaded dependencies, all generated code and compiled\nartifacts.\n\n----\n$ cd $GOPATH/src/github.com/fabric8-services/fabric8-wit\n$ make clean\n----\n\n===== Tests [[test]]\n\nHere's how to run all available tests. All tests will check all Go packages\nexcept those in the `vendor/` directory.\nMake sure you have docker and docker-compose available.\n\nSetting up test environment - `make integration-test-env-prepare`\n\nTear test environment down - `make integration-test-env-tear-down`\n\n[horizontal]\nunit-tests::\nUnit tests have the minimum requirement on time and environment setup.\n+\n----\n$ cd $GOPATH/src/github.com/fabric8-services/fabric8-wit\n$ make test-unit\n----\n\nintegration-tests::\nIntegration tests demand more setup (i.e. the PostgreSQL DB must be already\nrunning) and probably time. We recommend that you use `docker-compose up -d db`.\n+\n----\n$ cd $GOPATH/src/github.com/fabric8-services/fabric8-wit\n$ make test-integration\n----\n\nall::\nTo run both, the unit and the integration tests you can run\n+\n----\n$ cd $GOPATH/src/github.com/fabric8-services/fabric8-wit\n$ make test-all\n----\n\n===== Coverage [[coverage]]\n\nTo visualize the coverage of unit, integration, or all tests you can run these\ncommands:\n\n * `$ make coverage-unit`\n * `$ make coverage-integration`\n * `$ make coverage-all`\n\nNOTE: If the tests (see \u003c\u003ctest\u003e\u003e) have not yet run, or if the sources have changed\nsince the last time the tests ran, they will be re-run to produce up to date\ncoverage profiles.\n\nEach of the above tests (see \u003c\u003ctest\u003e\u003e) produces a coverage profile by default.\nThose coverage files are available under\n\n----\ntmp/coverage/\u003cpackage\u003e/coverage.\u003ctest\u003e.mode-\u003cmode\u003e\n----\n\nHere's how the \u003cplaceholders\u003e expand\n\n[horizontal]\n`\u003cpackage\u003e`::\nsomething like `github.com/fabric8-services/fabric8-wit/models`\n\n`\u003ctest\u003e`::\n`unit` or `integration`\n\n`\u003cmode\u003e`::\nSets the mode for coverage analysis for the packages being tested.\nPossible values for `\u003cmode\u003e` are *set* (the default), *count*, or *atomic* and\nthey directly relate to the output of `go test --help`.\n * *set*: bool: does this statement run?\n * *count*: int: how many times does this statement run?\n * *atomic*: int: count, but correct in multithreaded tests; significantly more\n   expensive.\n\nIn addition to all individual coverage information for each package, we also\ncreate three more files:\n\n[horizontal]\n`tmp/coverage.unit.mode-\u003cmode\u003e`::\nThis file collects all the coverage profiles for all *unit* tests.\n\n`tmp/coverage.integration.mode-\u003cmode\u003e`::\nThis file collects all the coverage profiles for all *integration* tests.\n\n`tmp/coverage.mode-\u003cmode\u003e`::\nThis file is the merge result of the two afore mentioned files and thus gives\ncoverage information for all tests.\n\n== Build through minishift\n\nThere is a separate documentation for https://github.com/fabric8-services/fabric8-wit/blob/master/minishift/README.adoc[building WIT using minishift]\n\n\n== Configuration file\n\nIf no configuration file is specified when the core is started, these are the defaults.\n\n[source,yaml]\n.config.yaml\n----\n#------------------------\n# Postgres configuration\n#------------------------\n\npostgres.host: localhost\npostgres.port: 5432\npostgres.user: postgres\npostgres.password: mysecretpassword\npostgres.database: postgres\npostgres.sslmode: disable\n# The amount of time in seconds before the connection times out\npostgres.connection.timeout: 5\n# Duration to wait before trying to connect again\npostgres.connection.retrysleep: 1s\n\n#------------------------\n# HTTP configuration\n#------------------------\n\nhttp.address: 0.0.0.0:8080\n\n#------------------------\n# Misc.\n#------------------------\n\n# Enable development related features, e.g. token generation endpoint\ndeveloper.mode.enabled: false\n\n# Whether you want to create the common work item types such as bug, feature, ...\npopulate.commontypes: true\n\n# -----------------------------\n# Authentication configuration\n# -----------------------------\n\ntoken.privatekey : \u003e\n                    -----BEGIN RSA PRIVATE KEY-----\n                    MIIEpQIBAAKCAQEAnwrjH5iTSErw9xUptp6QSFoUfpHUXZ+PaslYSUrpLjw1q27O\n                    DSFwmhV4+dAaTMO5chFv/kM36H3ZOyA146nwxBobS723okFaIkshRrf6qgtD6coT\n                    HlVUSBTAcwKEjNn4C9jtEpyOl+eSgxhMzRH3bwTIFlLlVMiZf7XVE7P3yuOCpqkk\n                    2rdYVSpQWQWKU+ZRywJkYcLwjEYjc70AoNpjO5QnY+Exx98E30iEdPHZpsfNhsjh\n                    9Z7IX5TrMYgz7zBTw8+niO/uq3RBaHyIhDbvenbR9Q59d88lbnEeHKgSMe2RQpFR\n                    3rxFRkc/64Rn/bMuL/ptNowPqh1P+9GjYzWmPwIDAQABAoIBAQCBCl5ZpnvprhRx\n                    BVTA/Upnyd7TCxNZmzrME+10Gjmz79pD7DV25ejsu/taBYUxP6TZbliF3pggJOv6\n                    UxomTB4znlMDUz0JgyjUpkyril7xVQ6XRAPbGrS1f1Def+54MepWAn3oGeqASb3Q\n                    bAj0Yl12UFTf+AZmkhQpUKk/wUeN718EIY4GRHHQ6ykMSqCKvdnVbMyb9sIzbSTl\n                    v+l1nQFnB/neyJq6P0Q7cxlhVj03IhYj/AxveNlKqZd2Ih3m/CJo0Abtwhx+qHZp\n                    cCBrYj7VelEaGARTmfoIVoGxFGKZNCcNzn7R2ic7safxXqeEnxugsAYX/UmMoq1b\n                    vMYLcaLRAoGBAMqMbbgejbD8Cy6wa5yg7XquqOP5gPdIYYS88TkQTp+razDqKPIU\n                    hPKetnTDJ7PZleOLE6eJ+dQJ8gl6D/dtOsl4lVRy/BU74dk0fYMiEfiJMYEYuAU0\n                    MCramo3HAeySTP8pxSLFYqJVhcTpL9+NQgbpJBUlx5bLDlJPl7auY077AoGBAMkD\n                    UpJRIv/0gYSz5btVheEyDzcqzOMZUVsngabH7aoQ49VjKrfLzJ9WznzJS5gZF58P\n                    vB7RLuIA8m8Y4FUwxOr4w9WOevzlFh0gyzgNY4gCwrzEryOZqYYqCN+8QLWfq/hL\n                    +gYFYpEW5pJ/lAy2i8kPanC3DyoqiZCsUmlg6JKNAoGBAIdCkf6zgKGhHwKV07cs\n                    DIqx2p0rQEFid6UB3ADkb+zWt2VZ6fAHXeT7shJ1RK0o75ydgomObWR5I8XKWqE7\n                    s1dZjDdx9f9kFuVK1Upd1SxoycNRM4peGJB1nWJydEl8RajcRwZ6U+zeOc+OfWbH\n                    WUFuLadlrEx5212CQ2k+OZlDAoGAdsH2w6kZ83xCFOOv41ioqx5HLQGlYLpxfVg+\n                    2gkeWa523HglIcdPEghYIBNRDQAuG3RRYSeW+kEy+f4Jc2tHu8bS9FWkRcsWoIji\n                    ZzBJ0G5JHPtaub6sEC6/ZWe0F1nJYP2KLop57FxKRt0G2+fxeA0ahpMwa2oMMiQM\n                    4GM3pHUCgYEAj2ZjjsF2MXYA6kuPUG1vyY9pvj1n4fyEEoV/zxY1k56UKboVOtYr\n                    BA/cKaLPqUF+08Tz/9MPBw51UH4GYfppA/x0ktc8998984FeIpfIFX6I2U9yUnoQ\n                    OCCAgsB8g8yTB4qntAYyfofEoDiseKrngQT5DSdxd51A/jw7B8WyBK8=\n                    -----END RSA PRIVATE KEY-----\n\ntoken.publickey : \u003e\n                    -----BEGIN PUBLIC KEY-----\n                    MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnwrjH5iTSErw9xUptp6Q\n                    SFoUfpHUXZ+PaslYSUrpLjw1q27ODSFwmhV4+dAaTMO5chFv/kM36H3ZOyA146nw\n                    xBobS723okFaIkshRrf6qgtD6coTHlVUSBTAcwKEjNn4C9jtEpyOl+eSgxhMzRH3\n                    bwTIFlLlVMiZf7XVE7P3yuOCpqkk2rdYVSpQWQWKU+ZRywJkYcLwjEYjc70AoNpj\n                    O5QnY+Exx98E30iEdPHZpsfNhsjh9Z7IX5TrMYgz7zBTw8+niO/uq3RBaHyIhDbv\n                    enbR9Q59d88lbnEeHKgSMe2RQpFR3rxFRkc/64Rn/bMuL/ptNowPqh1P+9GjYzWm\n                    PwIDAQAB\n                    -----END PUBLIC KEY-----\n\n\n# ----------------------------\n# Github OAuth2 configuration\n# ----------------------------\n\ngithub.client.id : 875da0d2113ba0a6951d\ngithub.secret : 2fe6736e90a9283036a37059d75ac0c82f4f5288\n\n----\n\nAlthough this is a YAML file, we highly suggest to stick to this rather lenghty notation instead of nesting structs.\n\nTo override configuration values using environment variables, use the prefix\n`F8_` and replace the dots in the variables names with underscores.\n\nFor example to override `postgres.password`, set the environment variable `F8_POSTGRES_PASSWORD` to the value of you liking.\n\nNOTE: config.yaml is *not* processed by default. In order to use it, the following environment variable must be set `export F8_CONFIG_FILE_PATH=\"config.yaml\"`\n\nNOTE: Environment variables override the default values and the ones you've set in your config file.\n\n==== Development\n\nOnly files `+./*.go+`, `+./design/*.go+`, `+./models/*.go+` and `+./tool/wit-cli/main.go+` should be edited.\n\nThese files and directory are generated:\n\n * `./app/`\n * `./assets/js/`\n * `./client/`\n * `./swagger/`\n * `./tool/cli/`\n * `./bindata_asstfs.go`\n\n== Developer setup\n\nStart up dependent docker services using `docker-compose` and runs auto reload on source change tool `fresh`.\n\n----\n$ cd $GOPATH/src/github.com/fabric8-services/fabric8-wit\n$ make dev\n----\n\nThe above steps start the API Server on port 8080.\n\nTest out the build by executing CLI commands in a different terminal.\n\nNOTE: The CLI needs the API Server which was started on executing `make dev`  to be up and running. Please do not kill the process. Alternatively if you haven't run `make dev` you could just start the server by running `./bin/alm`.\n\n* Generate a token for future use.\n----\n$ bin/wit-cli generate login -H localhost:8080 --pp\n----\n\nYou should get access_token in response, set it as env to ease future call:\n----\n$ export KEY=\u003cACCESS_TOKEN\u003e\n----\n\n* Create a space\n----\n$ bin/wit-cli create space -H localhost:8080 --key $KEY --payload '{\"data\": {\"name\": \"MY_SPACE\",\"path\": \"\",\"attributes\": {\"name\": \"MY_SPACE\",\"description\": \"description\"},\"type\": \"spaces\",\"privateSpace\": false}}'\n----\nNote the spaceID to be used in next request.\n\n* Create a workitem for your newly created space\n----\n$ bin/wit-cli create workitems -H localhost:8080 --key $KEY --spaceID 564a1296-887e-47fe-9e56-40a39995f585 --payload '{\"data\":{\"attributes\":{\"system.title\":\"test\",\"system.description\":\"\",\"system.state\":\"New\"},\"relationships\":{\"baseType\":{\"data\":{\"id\":\"2c169431-a55d-49eb-af74-cc19e895356f\",\"type\":\"workitemtypes\"}}},\"type\":\"workitems\"}}\n----\nwhere baseType in the payload refer to a work item type.\n\n* List all workitems for a given space:\n----\n$ bin/wit-cli list workitems -H localhost:8080 --pp --spaceID 564a1296-887e-47fe-9e56-40a39995f585\n----\n\n=== Reset Database\n\nThe database are kept in a docker container that gets reused between restarts. Thus restarts will not clear out the database.\n\nTo clear out the database kill the database like this:\n\n----\n$ docker kill fabric8wit_db_1 \u0026\u0026 docker rm fabric8wit_db_1\n----\n\nIn case you have mulitple `fabric8*` running use `docker ps` to locate the container name.\n\n== Debugging [[debug]]\n\nSystem defined Work Item Types are\n\n * userstory\n * valueproposition\n * fundamental\n * experience\n * feature\n * bug\n\nUse any one of above to create Work Item based on that type.\nFollowing example creates a Work Item of type `userstory`\n----\n$ ./bin/wit-cli create workitem --key \"\u003cGENERATED TOKEN\u003e\" --payload '{ \"data\": { \"attributes\": { \"system.owner\": \"tmaeder\", \"system.state\": \"open\", \"system.title\": \"Example of an Epic\", \"version\": \"1\" }, \"relationships\": { \"baseType\": { \"data\": { \"id\": \"Epic\", \"type\": \"workitemtypes\" } } }, \"type\": \"workitems\" } }' -H localhost:8080\n----\n\nIn response you should get ID of created item, using that you can retrieve the work item.\n\n----\n$ ./bin/wit-cli show workitem --id \u003cID\u003e -H localhost:8080 --pp\n----\n\n== Swagger API\n\nA browsable documentation for our API is available with http://swagger.goa.design/?url=github.com%2Ffabric8-services%2Ffabric8-wit%2Fdesign[goa Swagger Generator]. It reflects the latest state of the master branch.\n\n== Prod preview setup\n\nIn order to setup wit to work against link:https://prod-preview.openshift.io/[prod preview] the following environment variables must be set:\n\n* `export F8_DEVELOPER_MODE_ENABLED=1`\n* `export F8_OPENSHIFT_TENANT_MASTERURL=\"https://console.free-stg.openshift.com/\"`\n* `export F8_KEYCLOAK_REALM=\"fabric8\"`\n* `export F8_CONFIG_FILE_PATH=\"config.yaml\"`\n\nAlso, `F8_TENANT_SERVICEURL` env var must be set and point to the prod-preview link:https://github.com/fabric8-services/fabric8-tenant[fabric8-tenant] endpoint.\nHowever, there is no publicly available route for it and one should `oc login` to the prod-preview OpenShift Dedicated cluster and use\nlink:https://docs.openshift.com/enterprise/3.0/dev_guide/port_forwarding.html[port forwarding] for fabric8-tenant pod:\n\n----\n$ oc port-forward \u003cf8tenant-pod\u003e \u003clocal-port\u003e:8080\n----\n\n* `export F8_TENANT_SERVICEURL=\"http://localhost:\u003clocal-port\u003e/\"`\n\n== che-starter setup\n\nlink:https://github.com/redhat-developer/che-starter[che-starter] endpoint can be configure via the following environment variable:\n\n* `export F8_CHESTARTERURL=\"http://localhost:10000/\"`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabric8-services%2Ffabric8-wit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabric8-services%2Ffabric8-wit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabric8-services%2Ffabric8-wit/lists"}