Skip to content

feat: Update implementation based on ProjectV2* APIs, add draft APIs, project.items.remove* APIs no return items if found#68

Merged
gr2m merged 31 commits intobetafrom
56-use-project-v2-nodes
Aug 15, 2022
Merged

feat: Update implementation based on ProjectV2* APIs, add draft APIs, project.items.remove* APIs no return items if found#68
gr2m merged 31 commits intobetafrom
56-use-project-v2-nodes

Conversation

@gr2m
Copy link
Owner

@gr2m gr2m commented Aug 11, 2022

BREAKING CHANGE: org constructor option has been replaced with owner in order to support user projects

BREAKING CHANGE: node IDs changed, even for the same projects/project items etc

BREAKING CHANGE: project.item.remove* APIs now return the removed item, if it was found.

Review Notes

  • Preview of new README (diff)

  • Preview of new CONTRIBUTING - (diff)

  • the project.items.addDraft() API was added

  • All ProjectNext* GraphQL nodes have been replaced with their ProjectV2* notes throughout the code base

  • The internal caching of project items have been removed. It's no longer necessary thanks to the better capabilities of the new ProjectV2* nodes (before we needed it for the *ByContentId and *ByContentRepositoryAndNumber APIs). That means for projects with hundreds of items, project will become significantly faster and more reliable.

  • Most of the changes are fixtures diffs, no need to review them. The rest is still quite a lot but the structure of the files didn't change much so it should be okay to review file-by-file.

closes #4
closes #5

@gr2m gr2m linked an issue Aug 11, 2022 that may be closed by this pull request
2 tasks
@gr2m gr2m mentioned this pull request Aug 11, 2022
2 tasks
@gr2m gr2m force-pushed the 56-use-project-v2-nodes branch from e34cef3 to c622024 Compare August 14, 2022 05:28
@gr2m gr2m changed the title 🚧 feat: Update implementation based on ProjectV2* APIs, add draft APIs feat: Update implementation based on ProjectV2* APIs, add draft APIs Aug 15, 2022
@gr2m gr2m force-pushed the 56-use-project-v2-nodes branch from 32bdc45 to 2e4aa96 Compare August 15, 2022 21:05
@gr2m gr2m changed the base branch from main to beta August 15, 2022 21:10
// TODO: ideally we would retrieve a project item directly based on a content id
// and the project number, but GitHub's GraphQL Schema does not support that
// as of 2022-08-14. As a workaround, we load all project items and filter
// them by project number afterwards.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repositoryName: repositoryName,
number: issueOrPullRequestNumber,
})
.catch(handleNotFoundGraphqlError);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gr2m gr2m changed the title feat: Update implementation based on ProjectV2* APIs, add draft APIs feat: Update implementation based on ProjectV2* APIs, add draft APIs, project.items.remove* APIs no return items if found Aug 15, 2022
@gr2m gr2m merged commit 3918758 into beta Aug 15, 2022
@gr2m gr2m deleted the 56-use-project-v2-nodes branch August 15, 2022 22:06
@github-actions
Copy link

🎉 This PR is included in version 2.3.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update implementation based on new APIs

1 participant