Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Get issues from a project board when the user doesn't belong to any organization #44

Open
ramonmulia opened this issue Mar 10, 2022 · 4 comments

Comments

@ramonmulia
Copy link
Contributor

Currently this action works under a organization to get issues from project board. If someone wants to use this action and doesn't belong to any organization, it won't work.

for instance, this part of the query we use to get the cards, note we are passing the organization login as input.

query getAllBoardIssues($login: String!, $projectNumber: Int!, $cursor: String) {
  organization(login: $login) {
    projectNext(number: $projectNumber) {
      id
     ...
    }
  }
}

needs to improve this action creating a new query to get project cards when the user does not belong to any organization.

for instance

query getAllBoardIssues($userLogin: String!, $projectNumber: Int!, $cursor: String) {
 user(login: $userLogin){
   projectNext(number: $projectNumber) {
      id
     ...
    }
  }
}
@ramonmulia
Copy link
Contributor Author

ramonmulia commented Mar 10, 2022

We need to add two more inputs:

  • organization
  • user

as they are exclusive and they define where we need to pull the board cards first to not add duplicated ones.

@simoneb
Copy link
Member

simoneb commented Mar 10, 2022

yes, we can't assume that the org/user where the workflow using this actions runs is the org/user that we want to pull issues from. in fact in our case we want to pull issues from the fastify org from a repo under the nearform org

@GiuliaTeggi
Copy link
Contributor

Just to clarify, this function getAllBoardIssues is used to get the existing board issues, so that we do not populate the board with duplicate issues. It is not used to get the new issues that we want to add to the board. New issues can already be pulled from any organisation, no matter where the project board is.

The problem is that at the moment we assume that the project board will always be an organization project board.

@simoneb
Copy link
Member

simoneb commented Mar 10, 2022

Okay that clarifies it now, thanks Giulia

@GiuliaTeggi GiuliaTeggi removed their assignment Mar 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants