Git Product home page Git Product logo

create-or-update-project-card's People

Contributors

actions-bot avatar dependabot[bot] avatar peter-evans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

create-or-update-project-card's Issues

Does not seem to support "Beta" projects

Expected:

Define the name and location of "Beta" project to assign a card to an issue or PR.

Actual:

Does not find any projects. Only seems to find "classic" projects from my testing.

Attempts:

  • Fully scoped PAT token
  • Defining organization as project location

Logs:

##[debug]Inputs: {
##[debug]  token: '***',
##[debug]  projectLocation: 'my-org',
##[debug]  projectNumber: 0,
##[debug]  projectName: 'project-name,
##[debug]  columnName: '',
##[debug]  repository: 'my-org/repo-1',
##[debug]  issueNumber: 27
##[debug]}
##[debug]Projects list: []
##[debug]Projects: []
##[debug]Project: undefined
##[debug]'No project matching the supplied inputs found.'

How to moved an issue that is linked to the PR

I'd like to move an issue card that is linked to the PR, but I'm not sure how to get linked issues

name: Move issues to project columns

on:
  pull_request:
    types: [opened, closed, reopened]

jobs:
  move-issue:
    runs-on: ubuntu-latest
    steps:
      - name: Move issues to Code Review
        uses: peter-evans/create-or-update-project-card@v2
        with:
          project-location: 'myorg'
          project-name: 'project1'
          column-name: 'Code Review'
          issue-number: 29. # how to get a linked issue?
          token: ${{ secrets.GITHUB_TOKEN }}
        if: github.event_name == 'pull_request' && github.event.action == 'opened'

      - name: Move issues to DEV
        uses: peter-evans/create-or-update-project-card@v2
        with:
          project-location: 'myorg'
          project-name: 'project1'
          column-name: 'DEV'
          issue-number: 29
          token: ${{ secrets.GITHUB_TOKEN }}
        if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true


[Testing Issue]

This is an issue used by this action's workflow test cases.

Move multiple cards at once?

Hey,

Thanks for the great github actions plugin. We've found it very useful at our company.

I was wondering if there is a way to move multiple cards at once?

Thanks.

Need better error messages

Hey Peter, great job with this project.

I've tried using it but am running into some trouble.
Don't know if I'm looking in the right place but I couldn't find a clear error message.

Here's my experience:
Tried playing with the yaml format.
Tried increasing the scope of the token.
Tried using a repository project instead of a user project.
So this is the new workflow file:

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@v2
        with:
          project-name: 1
          column-name: Backlog
          issue-number: ${{ github.event.issue.number }}

Somehow it is still showing the token: ** even though I removed it in the invocation...
image

Added debug logging to action workflow by setting ACTIONS_RUNNER_DEBUG secret to true and downloading log archive.
Found this in runner-diagnostic-logs folder:

[2022-04-05 18:26:17Z INFO ProcessInvokerWrapper] Process started with process id 1523, waiting for process exit.
[2022-04-05 18:26:17Z INFO JobServerQueue] Try to upload 1 log files or attachments, success rate: 1/1.
[2022-04-05 18:26:17Z INFO ProcessInvokerWrapper] STDOUT/STDERR stream read finished.
[2022-04-05 18:26:17Z INFO ProcessInvokerWrapper] STDOUT/STDERR stream read finished.
[2022-04-05 18:26:17Z INFO ProcessInvokerWrapper] Finished process 1523 with exit code 1, and elapsed time 00:00:00.4126040.
[2022-04-05 18:26:17Z INFO CreateStepSummaryCommand] Step Summary is disabled; skipping attachment upload
[2022-04-05 18:26:17Z INFO StepsRunner] Step result: Failed
[2022-04-05 18:26:17Z INFO ExecutionContext] Publish step telemetry for current step {
  "action": "peter-evans/create-or-update-project-card",
  "ref": "v2",
  "type": "node16",
  "stage": "Main",
  "stepId": "745e91ee-9815-5c93-c9b0-e2d032c829c4",
  "hasPreStep": false,
  "hasPostStep": false,
  "result": "failed",
  "errorMessages": [],
  "executionTimeInSeconds": 1
}.

Since there is no clear error message I'm giving up.

Integration with pull request.

Hey,

Thanks for the amazing and helpful GitHub actions.

I want to know, is there any way to integrate the create-or-update-project-card action with your create-pull-request action so when someone pushes their code, pull request has been generated as well as it shows the card in projects.

Thanks a lot

Add capability to retrieve all pages when getting project list

We recently ran into an issue when using this action that seemed to indicate that only the first page of projects is returned. It may have been another issue, but I thought I'd file this bug to ask the question. Returning the first page is probably ok most of the time, but we have an organization with hundreds of projects. The action wasn't able to find a project by id and it appeared that not all of the projects were being returned.

How to enable Debug log

Hi,

I am trying to get this action to work but it just keeps failing so I would like to see more information as right now errors are not being logged.

Can you please advise how this can be enabled.

Project lookup fails when using a user for project-location

Hi Peter,

I have a project that belongs to a personal user (me).
I don't have an organization.
I want to link issues in several public repos from my personal user to the user project.
The project is the new beta version of projects.

The project lookup fails because the code is requesting an organization (a GET on 'https://api.github.com/orgs/tijlleenders') where I would expect it to skip that step as I provided a user for project-location:

Run peter-evans/create-or-update-project-card@v2
##[debug]Inputs: {
##[debug]  token: '***',
##[debug]  projectLocation: 'tijlleenders',
##[debug]  projectNumber: 1,
##[debug]  projectName: 'ZinZen_project',
##[debug]  columnName: 'Backlog',
##[debug]  repository: 'tijlleenders/ZinZen',
##[debug]  issueNumber: 198
##[debug]}
##[debug]RequestError [HttpError]: Not Found
##[debug]    at /home/runner/work/_actions/peter-evans/create-or-update-project-card/v2/dist/index.js:4041:23
##[debug]    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
##[debug]  status: 404,
##[debug]  headers: {
##[debug]    'access-control-allow-origin': '*',
##[debug]    'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
##[debug]    connection: 'close',
##[debug]    'content-encoding': 'gzip',
##[debug]    'content-security-policy': "default-src 'none'",
##[debug]    'content-type': 'application/json; charset=utf-8',
##[debug]    date: 'Fri, 08 Apr 2022 07:14:08 GMT',
##[debug]    'github-authentication-token-expiration': '2022-04-15 05:05:48 UTC',
##[debug]    'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
##[debug]    server: 'GitHub.com',
##[debug]    'strict-transport-security': 'max-age=3153[60](https://github.com/tijlleenders/ZinZen/runs/5881148031?check_suite_focus=true#step:2:60)00; includeSubdomains; preload',
##[debug]    'transfer-encoding': 'chunked',
##[debug]    vary: 'Accept-Encoding, Accept, X-Requested-With',
##[debug]    'x-accepted-oauth-scopes': 'admin:org, read:org, repo, user, write:org',
##[debug]    'x-content-type-options': 'nosniff',
##[debug]    'x-frame-options': 'deny',
##[debug]    'x-github-media-type': 'github.v3; format=json',
##[debug]    'x-github-request-id': '0601:11C3:4520CE:C2809E:[62](https://github.com/tijlleenders/ZinZen/runs/5881148031?check_suite_focus=true#step:2:62)4FE0C0',
##[debug]    'x-oauth-scopes': 'admin:org, repo',
##[debug]    'x-ratelimit-limit': '5000',
##[debug]    'x-ratelimit-remaining': '4997',
##[debug]    'x-ratelimit-reset': '1[64](https://github.com/tijlleenders/ZinZen/runs/5881148031?check_suite_focus=true#step:2:64)94055[67](https://github.com/tijlleenders/ZinZen/runs/5881148031?check_suite_focus=true#step:2:67)',
##[debug]    'x-ratelimit-resource': 'core',
##[debug]    'x-ratelimit-used': '3',
##[debug]    'x-xss-protection': '0'
##[debug]  },
##[debug]  request: {
##[debug]    method: 'GET',
##[debug]    url: 'https://api.github.com/orgs/tijlleenders',
##[debug]    headers: {
##[debug]      accept: 'application/vnd.github.v3+json',
##[debug]      'user-agent': 'octokit-core.js/3.4.0 Node.js/16.13.0 (linux; x64)',
##[debug]      authorization: 'token [REDACTED]'
##[debug]    },
##[debug]    request: { agent: [Agent], hook: [Function: bound bound register] }
##[debug]  },
##[debug]  documentation_url: 'https://docs.github.com/rest/reference/orgs#get-an-organization'
##[debug]}
##[debug]Projects list: []
##[debug]Projects: []
##[debug]Project: undefined
##[debug]'No project matching the supplied inputs found.'
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Create or Update Project Card

Workflow file input:

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@v2
        with:
          token: ${{ secrets.ADD_ISSUE_TO_PROJECT_PAT2 }}
          project-location: ${{ github.actor }}          
          project-number: 1
          project-name: ZinZen_project
          repository: ${{ github.repository }}
          issue-number: ${{ github.event.issue.number }}
          column-name: Backlog

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.