actions / add-to-project

Automate adding issues and pull requests to GitHub projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"The priority you are attempting to set for this record is not unique"

cadedaniel opened this issue · comments

Hi, thanks for the great work!

I am setting up a GitHub Project [beta] to track incidents at my company. My flow is : [incident management SaaS] -> GitHub integration to create an issue -> actions/add-to-project to add it to the project.

I just set it up and tested it by creating 15 issues in short succession using the GitHub CLI. They all got added to the project, but one action failed with the following output:

Error: Request failed due to following response errors:
 - Prioritization The priority you are attempting to set for this record is not unique

How can I fix this? Luckily it's rare (1/15), and maybe it only happens when I create many issues at the same time.

Thanks!

My full config is here:

name: "Add incident issues to tracker"
on:
  issues:
    types: [opened]

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/add-to-project@main
      if: ${{ github.event_name == 'issues' && contains(github.event.issue.body, 'incident-review') }}
      with:
        project-url: https://github.com/orgs/cadedaniel-org/projects/1/
        github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}

Yes, we're working on this internally, but for the time being, this should only occur when racing between two items getting add at the same time

I've also got the same error on a few pull requests (never with issues), with the same error message:

Request failed due to following response errors:
- Prioritization The priority you are attempting to set for this record is not unique

My configuration:

name: Triage on open

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

jobs:
  assign-to-projects:
    runs-on: ubuntu-latest
    steps:
      - name: All issues and PR to project Product Backlog
        uses: actions/add-to-project@v0.3.0
        with:
          project-url: https://github.com/orgs/Agapio-eu/projects/5
          github-token: ${{ secrets.TRIAGE_TOKEN }}

Once a PR has encountered the problem, I cannot add it to the project, even manually afterward, neither from the project itself nor from the PR.

Edit:

In our case, it seems to be due to the fact that we create issues, and add them to the project, then when we start working on them we convert the issue into a Pull Request using the CLI command hub pull-request -i XXXX (doc).

Issues already in our project disappear once converted to pull requests, even when the workflow is disabled.

Hello! Any updates on this issue ? We are experiencing it from time to time with the github integration we developed based on the new project. I throttled the bulk creation to make sure there are no race conditions but this has a negative impact on the perceived performance for our users. Any idea how we could improve this ?