Skip to content

Latest commit

 

History

History
80 lines (62 loc) · 5.19 KB

moving-assigned-issues-on-project-boards.md

File metadata and controls

80 lines (62 loc) · 5.19 KB
title intro redirect_from versions type topics shortTitle allowTitleToDifferFromFilename
Moving assigned issues on {% data variables.projects.projects_v1_boards %}
You can use {% data variables.product.prodname_actions %} to automatically move an issue to a specific column on a {% data variables.projects.projects_v1_board %} when the issue is assigned.
/actions/guides/moving-assigned-issues-on-project-boards
fpt ghes ghec
*
*
*
tutorial
Workflows
Project management
Move assigned issues
true

{% data reusables.projects.project_boards_old %}

{% data reusables.actions.enterprise-github-hosted-runners %}

Introduction

This tutorial demonstrates how to use the alex-page/github-project-automation-plus action to automatically move an issue to a specific column on a {% data variables.projects.projects_v1_board %} when the issue is assigned. For example, when an issue is assigned, you can move it into the In Progress column your {% data variables.projects.projects_v1_board %}.

In the tutorial, you will first make a workflow file that uses the alex-page/github-project-automation-plus action. Then, you will customize the workflow to suit your needs.

Creating the workflow

  1. {% data reusables.actions.choose-repo %}

  2. In your repository, choose a {% data variables.projects.projects_v1_board %}. {% ifversion projects-v1-can-create %} You can use an existing project, or you can create a new project. For more information about creating a project, see "AUTOTITLE."{% endif %}

  3. {% data reusables.actions.make-workflow-file %}

  4. Copy the following YAML contents into your workflow file.

    {% data reusables.actions.actions-not-certified-by-github-comment %}
    
    {% data reusables.actions.actions-use-sha-pinning-comment %}
    
    name: Move assigned card
    on:
      issues:
        types:
          - assigned
    jobs:
      move-assigned-card:
        runs-on: ubuntu-latest
        steps:
          - uses: alex-page/github-project-automation-plus@7ffb872c64bd809d23563a130a0a97d01dfa8f43
            with:
              project: Docs Work
              column: In Progress
              repo-token: {% raw %}${{ secrets.PERSONAL_ACCESS_TOKEN }}{% endraw %}
  5. Customize the parameters in your workflow file:

    • Change the value for project to the name of your {% data variables.projects.projects_v1_board %}. If you have multiple {% data variables.projects.projects_v1_boards %} with the same name, the alex-page/github-project-automation-plus action will act on all projects with the specified name.
    • Change the value for column to the name of the column where you want issues to move when they are assigned.
    • Change the value for repo-token:
      1. Create a {% data variables.product.pat_v1 %} with the repo scope. For more information, see "AUTOTITLE."
      2. Store this {% data variables.product.pat_generic %} as a secret in your repository. For more information about storing secrets, see "AUTOTITLE."
      3. In your workflow file, replace PERSONAL_ACCESS_TOKEN with the name of your secret.
  6. {% data reusables.actions.commit-workflow %}

Testing the workflow

Whenever an issue in your repository is assigned, the issue will be moved to the specified {% data variables.projects.projects_v1_board %} column. If the issue is not already on the {% data variables.projects.projects_v1_board %}, it will be added to the {% data variables.projects.projects_v1_board %}.

If your repository is user-owned, the alex-page/github-project-automation-plus action will act on all projects in your repository or personal account that have the specified project name and column. Likewise, if your repository is organization-owned, the action will act on all projects in your repository or organization that have the specified project name and column.

Test your workflow by assigning an issue in your repository.

  1. Open an issue in your repository. For more information, see "AUTOTITLE."
  2. Assign the issue. For more information, see "AUTOTITLE."
  3. To see the workflow run that assigning the issue triggered, view the history of your workflow runs. For more information, see "AUTOTITLE."
  4. When the workflow completes, the issue that you assigned should be added to the specified {% data variables.projects.projects_v1_board %} column.

Next steps