Skip to content

Community Backlog Automation

Oleksii Korshenko edited this page Jun 25, 2020 · 5 revisions

Installation for a new project

To Create New Project (clone from existing), you can use the following instruction. This example shows how to clone Adobe Stock Integration projects

Step 1. Get Source Project ID

query {
  organization (login: "magento") {
    repository (name: "adobe-stock-integration") {
      projects (first: 100) {
        nodes {
          name
          id
        } 
      }
    }
  }
}

Response example:

{
  "data": {
    "organization": {
      "repository": {
        "projects": {
          "nodes": [
            {
              "name": "Backlog",
              "id": "MDc6UHJvamVjdDI1MDk5Mzk=" //Rememeber this ID. This is sourceId for Backlog project
            },
            {
              "name": "Pull Request Progress",
              "id": "MDc6UHJvamVjdDI1MDk5ODQ=" //Rememeber this ID. This is sourceId for Pull Request Progress project
            }
          ]
        }
      }
    }
  }
}

Step 2. Get Target Repository ID:

query {
  organization (login: "magento") {

    repository (name: "<target repository name>") {
      name
      id
    }
  }
}

Response example:

{
  "data": {
    "organization": {
      "repository": {
        "name": "magento2-jp",
        "id": "MDEwOlJlcG9zaXRvcnkxMzYyNTc3NTg=" //Rememeber this ID. This is targetOwnerId
      }
    }
  }
}

Step 3. Clone Backlog Project

mutation {
  cloneProject (input: {
    body: "Japanese Localization Backlog", //Use your project description 
    clientMutationId: "integration-mutation-id",
    includeWorkflows: true,
    name: "Backlog",
    public: true,
    targetOwnerId: "MDEwOlJlcG9zaXRvcnkxMzYyNTc3NTg=", //Use targetOwnerId from Step 2
    sourceId: "MDc6UHJvamVjdDI1MDk5Mzk=" //Use targetOwnerId from Step 1 for Backlog project
  }) {
    project {
      url
    }
  }
}

Response Example:

{
  "data": {
    "cloneProject": {
      "project": {
        "url": "https://github.com/magento/magento2-jp/projects/1"
      }
    }
  }
}

Step 4. Clone Pull Request Progress project

mutation {
  cloneProject (input: {
    body: "Japanese Localization. Pull Request Progress", //Use your project description 
    clientMutationId: "integration-mutation-id", 
    includeWorkflows: true,
    name: "Pull Request Progress",
    public: true,
    targetOwnerId: "MDEwOlJlcG9zaXRvcnkxMzYyNTc3NTg=", //Use targetOwnerId from Step 2
    sourceId: "MDc6UHJvamVjdDI1MDk5ODQ=" //Use targetOwnerId from Step 1 for Pull Request Progress project
  }) {
    project {
      url
    }
  }
}

Response example:

{
  "data": {
    "cloneProject": {
      "project": {
        "url": "https://github.com/magento/magento2-jp/projects/2"
      }
    }
  }
}

Step 5. Create GitHub Team (Requires Maintainers permission for community-project-maintainers team)

  1. Create new child team: https://github.com/orgs/magento/teams/community-project-maintainers/teams
  2. Use the following team name: <repository-name>-team. For example: magento2-jp-team
  3. Add required users to the team
  4. Grant team with write permissions to the target repository

Step 6. Install M2 Community Project GitHub App on your repository (Requires Admin permission for Magento org)

  1. Go to installation section: https://github.com/organizations/magento/settings/apps/m2-community-project/installations
  2. Select Magento org
  3. Add your repository to the selected repos list
  4. Click Save button

Step 7. Move cards to the projects

  1. Add all open issues to the Backlog project. Use Ready for Grooming column. Move card to the required column if needed
  2. Add all open PRs to the Pull Request Progres project. Use Ready for Review column. Move card to the required column if needed

Backlog Board structure

Column Name Description
Ready for Grooming TBD
Ready for Development TBD
Good First Issue TBD
Dev In Progress TBD
Pull Request In Progress TBD
Done TBD

Backlog Board permissions

Only members of the GitHub team (project backlog team) <repository-name>-team has permissions to move cards on the board manually. All actions from non-team memebers will be automatically reverted. If you are managing backlog (see manual actions in Backlog board automation rules), please make sure that you are a member of project backlog owners team

Backlog board automation rules

TBD

Pull Requests Dashboard structure

Column Name Description
Work in Progress TBD
Ready for Review TBD
Review in Progress TBD
Changes Requested TBD
On Hold TBD
Acceptance Testing TBD
Ready for Delivery TBD
Done TBD

Pull Requests Dashboard automation rules

TBD

Backlog Board permissions

TBD

Clone this wiki locally