Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convenience method to auth with app installation token && documentation examples #583

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

PauloMigAlmeida
Copy link
Contributor

@PauloMigAlmeida PauloMigAlmeida commented Oct 30, 2019

Hi @bitwiseman

This PR fixes #570 #582 things discussed there.

List of things done:

  • Added a convenience method to authenticate with app installation tokens;

  • Converted existing markdown doc to APT due to formatting features;

    The maven-site-plugin (even the 3.3 onwards) Markdown implementation is rather limited and it wasn't exactly clear, visually, when the code snippets started when I started adding more of them.

    Before:
    image

    After:
    image

  • Replaced occurrences of kohsuke user to github-api org where applicable;

    I noticed that you transferred the github-api project to an org with the same name so I seized the opportunity to fix references in the source code to it too.

  • Fixed repositoryIds method on GHAppCreateTokenBuilder;

    That was something that slipped through the cracks on my last PR that both of us didn't notice during the review. The type should be Long rather than Integer. Considering that you haven't released it yet, I thought that now was the perfect opportunity to fix it.

    In case you want me to deprecate the original method and create a second one with the right method signature instead of replacing it, let me now ... it's up to you tbh.

Future work:
I plan to create another documentation page with the steps related to deal with Github apps but I decided to first focus on the several ways people can authenticate to Github with this library before anything else (most recurrent question IMHO). Also, I needed to know if I am heading in the right direction that you guys have in mind.

Convert existing markdown doc to APT due to formatting features;
Replace occurrences of kohsuke user to github-api org where applicable;
Fix repositoryIds method on GHAppCreateTokenBuilder;

Signed-off-by: PauloMigAlmeida <paulo.miguel.almeida.rodenas@gmail.com>
@PauloMigAlmeida PauloMigAlmeida changed the title Convenience method to auth as app installation token && documentation examples Convenience method to auth with app installation token && documentation examples Oct 30, 2019
@bitwiseman
Copy link
Member

I plan to create another documentation page with the steps related to deal with Github apps but I decided to first focus on the several ways people can authenticate to Github with this library before anything else (most recurrent question IMHO). Also, I needed to know if I am heading in the right direction that you guys have in mind.

File issues or use the the wiki to track future ideas and work. I'll take a look at this shortly.

@@ -0,0 +1,154 @@
What is this?
Copy link
Member

Choose a reason for hiding this comment

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

I'm going to talk through my thoughts here :

  • I have no love of markdown - using something else works fine for me.
  • I want to encourage you to make the docs better. From that perspective whatever format you want to use is fine by me.
  • I also want others to be able to do the same. I hadn't heard of APT before this. Others might not know it either and would need to learn it (though it looks easy enough).
  • I also want to be able to preview the changes on GitHub easily. This doesn't do that - we just get text. Bummer.

Meh, okay, let's try this.

Copy link
Member

@bitwiseman bitwiseman left a comment

Choose a reason for hiding this comment

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

Add the backward compatible method, at test for it, and file an issue for the eventual removal and this is good to go.

@bitwiseman bitwiseman merged commit c0117f0 into hub4j:master Oct 30, 2019
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.

Support all available endpoints for Github App with preview request
2 participants