Skip to content

Add support for editing Gists#484

Merged
bitwiseman merged 9 commits into
hub4j:masterfrom
martinvanzijl:issue_466_edit_gists
Oct 11, 2019
Merged

Add support for editing Gists#484
bitwiseman merged 9 commits into
hub4j:masterfrom
martinvanzijl:issue_466_edit_gists

Conversation

@martinvanzijl

Copy link
Copy Markdown
Contributor

Fixes issue #466.

Added the following methods:

  • GHGist.setDescription
  • GHGist.addFile
  • GHGist.updateFile
  • GHGist.renameFile

NOTE: I could not get the deleteFile() method to work. I have left it commented-out.

Fixes issue hub4j#466

NOTE: I could not get the deleteFile() method to work.

@bitwiseman bitwiseman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You have a ton of PRs up. Thanks! As with others, add some tests and I think we can merge.

@bitwiseman

Copy link
Copy Markdown
Member

@martinvanzijl There's actually GistBuilder, so it would be better if we had a GistUpdater class to do the updating.

- Created class GHGistUpdater to do the updating.
- Added unit tests.
@martinvanzijl

Copy link
Copy Markdown
Contributor Author

@bitwiseman
Thanks for reviewing. I created the GHGistUpdater class to do the updating as suggested, and added unit tests. Can you please check?

I still can't get the deleteFile method to work.

@bitwiseman bitwiseman merged commit 7d65e31 into hub4j:master Oct 11, 2019
}

// // This method does not work.
// public GHGistUpdater deleteFile(String fileName) throws IOException {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@martinvanzijl
This probably has to do with the way that values are passed via maps.
I suspect passing null results in the key not being set or at least not set to GitHub.

@martinvanzijl martinvanzijl deleted the issue_466_edit_gists branch October 13, 2019 02:24
bitwiseman added a commit to bitwiseman/github-api that referenced this pull request Apr 22, 2020
bitwiseman added a commit to bitwiseman/github-api that referenced this pull request Apr 26, 2020
bitwiseman added a commit to bitwiseman/github-api that referenced this pull request Apr 27, 2020
bitwiseman added a commit to bitwiseman/github-api that referenced this pull request Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants