GitXplorerGitXplorer
p

create-or-update-project-card

public
71 stars
17 forks
2 issues

Commits

List of commits on branch main.
Verified
55fa587c82c9983d6e1681e138439dc8b30db69f

Bump @types/node from 18.19.68 to 18.19.70 (#269)

ddependabot[bot] committed 11 days ago
Verified
4d0a84f998d50810d48e6399282fecd2f74bdd94

Bump @types/node from 18.19.67 to 18.19.68 (#268)

ddependabot[bot] committed a month ago
Verified
53405dcbc8cc9ef79e91227df20ab5485de5f44d

Bump prettier from 3.4.1 to 3.4.2 (#267)

ddependabot[bot] committed a month ago
Verified
a3e44655488119f17699f8a9ba1c6333e17cab52

Bump @types/node from 18.19.66 to 18.19.67 (#266)

ddependabot[bot] committed 2 months ago
Verified
d6cb797da85bf8348139bc67247dcdf0c3143a67

Bump prettier from 3.3.3 to 3.4.1 (#265)

ddependabot[bot] committed 2 months ago
Verified
5328d83605bd177340ed9af03d7c8453794ef20c

Bump @types/node from 18.19.64 to 18.19.66 (#264)

ddependabot[bot] committed 2 months ago

README

The README file for this repository.

Create or Update Project Card

CI GitHub Marketplace

A GitHub action to create or update a project card.

[!IMPORTANT]
This action does not support v2 projects and is now deprecated.

Usage

Create a project card

      - name: Create or Update Project Card
        uses: peter-evans/create-or-update-project-card@v3
        with:
          project-name: My project
          column-name: My column
          issue-number: 1

Update a project card

If a card already exists in project My project for issue 1, the action will check if the card is in column My second column. If not in the specified column, the action will move the card.

      - name: Create or Update Project Card
        uses: peter-evans/create-or-update-project-card@v3
        with:
          project-name: My project
          column-name: My second column
          issue-number: 1

Create a card in an organization or user project

When creating cards in an organization or user project, a repo and admin:org scoped Personal Access Token (PAT) is required.

      - name: Create or Update Project Card
        uses: peter-evans/create-or-update-project-card@v3
        with:
          token: ${{ secrets.PAT }}
          project-location: my-org
          project-name: My project
          column-name: My second column
          issue-number: 1

Create a card for all new issues

on:
  issues:
    types: [opened]
jobs:
  createCard:
    runs-on: ubuntu-latest
    steps:
      - name: Create or Update Project Card
        uses: peter-evans/create-or-update-project-card@v3
        with:
          project-name: My project
          column-name: My column

Create a card for all new pull requests

Note that the following example uses the pull_request_target event, not pull_request. In public repositories this action does not work in pull_request workflows when triggered by forks. This is due to token restrictions put in place by GitHub Actions. Private repositories can be configured to enable workflows from forks to run without restriction. See here for further explanation.

on:
  pull_request_target:
    types: [opened]
jobs:
  createCard:
    runs-on: ubuntu-latest
    steps:
      - name: Create or Update Project Card
        uses: peter-evans/create-or-update-project-card@v3
        with:
          project-name: My project
          column-name: My column
          issue-number: ${{ github.event.number }}

Action inputs

Name Description Default
token GITHUB_TOKEN or a repo scoped PAT. GITHUB_TOKEN
project-location The location of the project. Either a repository, organization, or user. github.repository (current repository)
project-number (semi-required) The number of the project. Either project-number OR project-name must be supplied.
project-name (semi-required) The name of the project. Either project-number OR project-name must be supplied. Note that a project's name is not unique. The action will use the first matching project found.
column-name (required) The name of the column to add a card to, or move an existing card to.
repository The GitHub repository containing the issue or pull request. github.repository (current repository)
issue-number The issue or pull request number to associate with the card. github.event.issue.number

Action outputs

The action outputs card-id for use in later workflow steps.

      - name: Create or Update Project Card
        id: coupc
        uses: peter-evans/create-or-update-project-card@v3
        with:
          project-name: My project
          column-name: My column
          issue-number: 1
      - name: Check output
        run: echo ${{ steps.coupc.outputs.card-id }}

License

MIT