Skip to content

Add core functionality for Project API's - #160

Merged
Howard Wolosky (HowardWolosky) merged 8 commits into
microsoft:masterfrom
jpomfret:projects
May 11, 2020
Merged

Howard Wolosky (HowardWolosky) merged 8 commits into
microsoft:masterfrom
jpomfret:projects

Conversation

@jpomfret

@jpomfret Jess Pomfret (jpomfret) commented Apr 26, 2020 •

Copy link
Copy Markdown
Contributor

Adding support for projects core functionality

  • Get
    • Repository projects
    • Organization projects
    • User Projects
    • Any of the above by Project Id
  • New
    • Repository projects
    • Organization projects
    • User Projects
  • Set
    • By Id - but can pass in information for repo, organisation or user
  • Delete
    • By Id - but can pass in information for repo, organisation or user

Also added test coverage - all tests passed on my machine, I did have issues with the last call to remove the repository.

Resolves #159

@jpomfret

Copy link
Copy Markdown
Contributor Author

Issue was because I didn't give my token the right access :)

@HowardWolosky Howard Wolosky (HowardWolosky) changed the title Add core project functionality for issue #159 Add core project functionality Apr 27, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wow....this is GREAT! Thanks so much for putting in all this great work. Very much appreciated! I'm sure that this will help out a bunch of users.

I think that you did a great job adhering to the overall project style. I've left a number of comments for you to review and address.

Again...thanks so much for all of this!

Comment thread GitHubProjects.ps1 Resolved
Comment thread GitHubProjects.ps1 Resolved
Comment thread GitHubProjects.ps1 Resolved
Comment thread GitHubProjects.ps1 Resolved
Comment thread GitHubProjects.ps1 Resolved
Comment thread GitHubProjects.ps1 Resolved
Comment thread GitHubProjects.ps1 Resolved
Comment thread GitHubProjects.ps1 Resolved
Comment thread Tests/GitHubProjects.tests.ps1 Resolved
Comment thread Tests/GitHubProjects.tests.ps1 Outdated
$results = Get-GitHubProject -Project $repoProject.id
}
catch {
$null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the scenario you're working around here? At the very least, this deserves a comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The Get was failing to find the project and when using the -Project parameter it threw an error which messed up the tests.

Changed these tests around to test for the thrown error instead... new version incoming :)

@jpomfret

Copy link
Copy Markdown
Contributor Author

Thank you so much for the code review! Working through the changes.

@jpomfret

Copy link
Copy Markdown
Contributor Author

force pushed because I made the same changes in my local repo as I committed from the review (didn't realise what I was doing was actually making the changes, sorry if that broke anything!)

@jpomfret

Copy link
Copy Markdown
Contributor Author

Hey Howard Wolosky (@HowardWolosky) - I have another piece of work ready to PR for Project Columns, wondering if I should lump it into this PR or if you'd rather keep it seperate?

Also - let me know if I'm still outstanding on any review items for this core project piece - I believe everything has been addressed.

Thanks!

@HowardWolosky

Copy link
Copy Markdown
Contributor

Jess Pomfret (@jpomfret), please keep them separate. I'd also recommend, if possible, to do it in a new branch off of master as opposed to a new branch off of jpomfret:projects. Things will get a bit trickier if you continue to branch off new work from a branch that's in review.

I'll be continuing my review of this PR tomorrow.

Thanks again for the contributions....Looking forward to seeing the additional work!

@jpomfret

Copy link
Copy Markdown
Contributor Author

Thanks Howard Wolosky (@HowardWolosky) - I submitted two new PR's for the other pieces. I'll be around tomorrow for any fixes you need. (I tried really hard on spacing and brackets.. but I'm sure you'll find some 😄)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the update.
Just a few minor additional corrections to make, then we can merge this in.

Comment thread GitHubProjects.ps1 Resolved
Comment thread GitHubProjects.ps1 Resolved
Comment thread GitHubProjects.ps1 Resolved
Comment thread GitHubProjects.ps1 Resolved
Comment thread GitHubProjects.ps1 Resolved
Comment thread Tests/GitHubProjects.tests.ps1 Resolved
@HowardWolosky Howard Wolosky (HowardWolosky) added api completeness This is basic API functionality that hasn't been implemented yet. api-project Work to complete the API's defined here: https://developer.github.com/v3/projects labels May 11, 2020
@HowardWolosky Howard Wolosky (HowardWolosky) changed the title Add core project functionality Add core functionality for Project API's May 11, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Final updates look good.
Locally ran all tests and they passed.
This looks good to merge.

🎆 🚢 🎆

@HowardWolosky
Howard Wolosky (HowardWolosky) merged commit 1cdaac1 into microsoft:master May 11, 2020
@HowardWolosky

Copy link
Copy Markdown
Contributor

This is now available publicly in 0.12.0. Thanks so much for your contribution. 🎆

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

Labels

api completeness This is basic API functionality that hasn't been implemented yet. api-project Work to complete the API's defined here: https://developer.github.com/v3/projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API Completeness - Projects

2 participants