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

Help configuration parameter github #7

Closed
Ludovicis opened this issue Sep 7, 2020 · 16 comments
Closed

Help configuration parameter github #7

Ludovicis opened this issue Sep 7, 2020 · 16 comments
Assignees

Comments

@Ludovicis
Copy link

Ludovicis commented Sep 7, 2020

Can you add the procedure to parameter your application, please ?
Thanks,

@julien-nc
Copy link
Member

I'll write some documentation soon.

Could you point the things you find hard to figure out?

Brief guide:
There are 2 ways to "connect" to GitHub:

  • create personal token in your settings and put it in the "linked account" (will be renamed in "connected account" soon) personal setting section
  • create (on GitHub) and configure (on Nextcloud) an OAuth app in the "linked/connected account" admin setting section and then use the magic of OAuth by clicking on the button in "linked/connected account" personal setting section

@Ludovicis
Copy link
Author

Ludovicis commented Sep 16, 2020

Hello eneiluj,

Personal token in my setting and linked account ok
image
image

My doubts go to the configuration oauth apps in https://github.com/settings/developers
My screen capture
image

What is the Homepage URL and the Authorization callback URL, please ?
Actually, only searching for repositories, issue and pull request work
I haven't gitHub notification on my dashboard widget
I have test with https://nextcloud.domaine.org and https://nextcloud.domaine.org/auth/oauth2/callback in the Authorization callback URL in https://github.com/settings/applications/xxxxxxx, same result nothing in dashboard

Thanks for your help

@julien-nc
Copy link
Member

Thanks for the detailed feedback!

  1. OAuth app: When you create an OAuth app in GitHub, the goal is to enable all your Nextcloud users to use OAuth to authenticate to GitHub. As you are the one creating the app, put whatever you want in Homepage URL. This URL will be shown to your users when they authenticate with OAuth.

The callback URL is given to you in Nextcloud admin settings: Make sure you set the "redirect_uri" to...

Once you have created your OAuth app in GitHub and set the client ID and client secret in Nextcloud admin settings, you should see a new button in Nextcloud personal settings to use OAuth to authenticate to GitHub.

  1. Nothing in the widget

As the search is working for you, you are successfully authenticated to GitHub. The widget should work. We might be facing a bug here. Could you look for related errors in the browser logs and in Nextcloud's server logs?

@julien-nc
Copy link
Member

To make authentication a bit clearer:

As a Nextcloud admin you can choose to create a GitHub OAuth app or not.

As a Nextcloud user, if the Nextcloud admin didn't create and configure a GitHub OAuth app, you can only authenticate with a "GitHub personal token" that you create in your GitHub settings.

If a Nextcloud admin created and configured a GitHub OAuth app, then all Nextcloud users will see the "Get access with OAuth" (will be renamed in "Connect to GitHub"). The purpose of this button is to automatically get a token with OAuth. In the end, it's the same result, the Nextcloud user gets an authentication token.

@Ludovicis
Copy link
Author

Ludovicis commented Sep 16, 2020

thank you for these clarifications
I have check my nextcloud log nothing, no error from your app. But always Nothing to show on dasboard...
Nothing also in devtool of chrome.

@julien-nc
Copy link
Member

Does the widget show "nothing to show" or does it seem like a bug?

@julien-nc
Copy link
Member

Maybe it's just that you were not mentioned recently. Notifications are filtered to only show you the most important ones:

  • things that are assigned to you
  • if you were mentioned
  • if your review was requested
  • only show things more recent than 2 weeks

Could it be that you don't have much activity on GitHub? 😁

@julien-nc
Copy link
Member

@Ludovicis Let's stimulate the activity of your account 😉 .

@Ludovicis
Copy link
Author

Ludovicis commented Sep 16, 2020

Your assigned has stimulate my dashboard github widget thanks 👍
image
can you add in your filter, please:

  • News release
  • All conversation
    image

And in the search github nextcloud , open on new tab

Thanks again,

@DavidMStraub
Copy link

Hi,

thanks for this nice integration!

It would be great if you could mention in the app store intro what the scope of the access token needs to be (which rights need to be granted).

@Proximus888
Copy link

Your assigned has stimulate my dashboard github widget thanks 👍
image
can you add in your filter, please:

  • News release
  • All conversation
    image

And in the search github nextcloud , open on new tab

Thanks again,

+1

Would love a option to change/adjust the filter. What is most important for me is new releases. At the moment those notifications will never show on my dashboard widget.

Thanks for the effort!

@julien-nc
Copy link
Member

It would be great if you could mention in the app store intro what the scope of the access token needs to be (which rights need to be granted).

@DavidMStraub The scopes are listed in connected accounts personal settings if no OAuth configuration was done and the "personal access token" field is visible. Why would you want to see them also in the readme?

What is most important for me is new releases

@Proximus888 I'll see what I can do. I agree new releases are important events.

About the projects you are watching, I think it's out of the widget's scope as it might generate a lot of content with "low" importance and avoid users to see what they want to focus on... Don't you think?

Making it optional is a possibility indeed but I would like to avoid adding settings/complexity.

julien-nc pushed a commit that referenced this issue Oct 16, 2020
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
@julien-nc
Copy link
Member

@Proximus888 Releases are now displayed in the widget.

release

This will be included in next release soon(ish).

@DavidMStraub
Copy link

@DavidMStraub The scopes are listed in connected accounts personal settings if no OAuth configuration was done and the "personal access token" field is visible. Why would you want to see them also in the readme?

Oh really? I must have missed that somehow 🤔 But yes, that is perfectly fine then!

@julien-nc
Copy link
Member

@Proximus888 New releases are now displayed in the widget. It's included in v0.0.7 which is out.

Let's close this swiss army knife issue 😁.

@Proximus888
Copy link

@Proximus888 Releases are now displayed in the widget.

release

This will be included in next release soon(ish).

Awesome, thanks

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

No branches or pull requests

4 participants