Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

How to use with private repo #5

Open
niklas-may opened this issue Jan 11, 2021 · 3 comments
Open

How to use with private repo #5

niklas-may opened this issue Jan 11, 2021 · 3 comments

Comments

@niklas-may
Copy link

The API throws the following Error on the issues endpoint
{ "message": "Not Found", "documentation_url": "https://docs.github.com/rest/reference/issues#list-repository-issues" }
I guess this is because the repo is set to private?

Is there a way to use this workflow with a private repo?

@ViRGiL175
Copy link
Owner

Hey. It's nice that this repository is getting attention.

Unfortunately, we have completely transferred our backlog to Notion and I no longer plan to use this Action.

And I haven't tried it on private repos. However, not too long ago I created an Action for a private repository that sorted cards in the boards of the GitHub project.

As far as I remember, you can access the private repository through Action by generating a separate GitHub token with access rights to private repositories and / or organizations. All the details are there: https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#about-the-github_token-secret

This allowed me to work with a private repository and successfully sort the cards in the project.

More about GitHub Action authorization via JS is shown here: https://github.com/octokit/auth-action.js#usage

Thus, to implement access to private repositories, you can add 3-5 lines of code somewhere here:

const octokit = new Octokit()

If you try to do this with our Action, then do not forget that you first need to compile TypeScript → JavaScript, and then JavaScript → Distilled JS. There are ready-made commands for this in the project:

"build": "tsc -b",
"minify": "tsc -b && ncc build --minify index.js"

@niklas-may
Copy link
Author

Thanks a lot for your in depth explanation. I will implement this as an option. Are you interested in a PR or are you completely done with this project?

@ViRGiL175
Copy link
Owner

Thanks a lot for your in depth explanation. I will implement this as an option. Are you interested in a PR or are you completely done with this project?

JS is not my main field, and I'm not using this project right now, but if other people are interested in this Action I will be very happy maintaining it (as long I have time), so any PR is welcomed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants