Here are some minimal steps to set up a new Bug Bash Campaign.
-
Create a new Campaign record:
curl -u "theAdminUsername:theAdminPassword" -X PUT http://localhost:7777/admin/campaign/add/myCampaignName -d '{ "startOn": "2021-03-10T12:00:00.000Z", "endOn": "2022-03-15T12:00:00.000Z"}'
Be sure you use a
startOn
andendOn
date that is before today, and after today, otherwise the campaign will not be "active". Use the command below to verify your new campaign appears in the list of "active" campaigns:curl http://localhost:7777/campaign/active
-
Add the organization that owns the repository that will be having a bug bash. (For personal repositories, the "organization" will just be your GitHub username.)
curl -u "theAdminUsername:theAdminPassword" -X PUT http://localhost:7777/admin/organization/add -d '{ "scpName": "GitHub", "organization": "my-organization"}'
-
Add at least one participant (e.g. a GitHub user) who will be submitting bug fixes (PRs) during this campaign:
curl -u "theAdminUsername:theAdminPassword" -X PUT http://localhost:7777/admin/participant/add -d '{ "scpName": "GitHub", "campaignName": "myCampaignName", "loginName": "mygithubid"}'
Before going much further, you should ensure Sonatype Lift is configured for your GitHub repository.
To verify things are working, have the GitHub user (
mygithubid
in this example) generate a Pull Request against a repository owned by the organization we added (my-organization
in this example). Once the PR is created, you should see Lift performing an analysis of the PR, similar to this: -
To view the current scores for your Bug Bash, open a browser to: http://localhost:7777/index.html
-
You can update an existing Campaign (e.g.
myCampaignName
) with new "start" and "end" dates using the command below:curl -u "theAdminUsername:theAdminPassword" -X PUT http://localhost:7777/admin/campaign/update/myCampaignName -d '{ "startOn": "2022-04-15T12:00:00Z", "endOn": "2022-04-30T12:00:00Z"}'
-
List Active Campaigns using the command below. This includes only those campaigns with an end date that is after today.
curl http://localhost:7777/campaign/active