Comments (4)
GitHub Developer Documentation link updated in the issue's resources.
from cti-website-frontend.
I can use my personal-access-token to hit the replace all repository tags API endpoint https://developer.github.com/v3/repos/#replace-all-repository-topics
But when I use the access-token generated by GitHub App(steps in StackOverflow question) I get the following:
{
"message": "Resource not accessible by integration",
"documentation_url": "https://developer.github.com/v3/repos#replace-all-topics-for-a-repository"
}
To describe my issue, refer the question on StackOverflow(the question talks about consuming issues GitHub API but the scenario is entirely the same with the API that I am trying to consume) https://stackoverflow.com/questions/51336005/github-api-what-permission-should-a-github-app-get-when-create-an-issue
Resolution
Trying to find a solution/workaround
from cti-website-frontend.
Functionality achieved
OAuth Application created for Civic Tech Index Organization.
Steps to replicate the demo:
- In a browser window, open the link
- Authorize the OAuth Application
- Grab only the query parameter code from the URL
- Using Postman, consume the following POST API endpoint:
https://github.com/login/oauth/access_token?client_id=8ce9dc8a15484de9060d&client_secret=4cec9b74ff3e912c354e8437dfb45303d2bb79a5&code=9496c118aec0f37d831b&redirect_uri=https://cti-dev.herokuapp.com/&state=j16nz4wntk
- From the API response grab the access token
- Consume the GitHub API - PUT Replace all repository topics
- Use the access token as a Request Header for the above PUT API endpoint,
Key: Authorization, Value: Bearer <access-token obtained>
- In the Body, switch to raw - JSON format and add the following:
{
"names": [
"civictechindex"
]
}
- Hit Send Button
- On a successful replace all repository tags functionality, the API should return status code 200 with response same as the body in step 8
Security concerns:
- Client ID and Client Secret are exposed in PUT API call (step 4)
- All of this needs to achieved using an interface/website -> initiation from Checkout out our automated process [Referring the Figma file]
from cti-website-frontend.
This issue can be closed as the GitHub Oauth App for civictechindex is configured and steps to replicate the automation of repository tags explained in the above comment
from cti-website-frontend.
Related Issues (20)
- 'Civic Tech Organizations' Page Audit - Web
- 'Collaborate with us' Page Audit - Web
- 'Donate' Page Audit - Web
- 'Share the CTI' Page Audit - Web
- Civic Tech Organization Search - Open to lowest level when only 1 Organization shows HOT 1
- Github Rate Limitations
- Fix "removed in Django41Warning" HOT 3
- Most Recently Updated on Organizations Page
- Store state changes for searches HOT 2
- Org list box size responsiveness HOT 2
- "has github" checkbox on Organizations page HOT 1
- Re-parent orgs to siblings of Code for All
- Update link for CTI assets HOT 1
- Add Link type for commonly used social media
- Fix or replace use-query-params for org search HOT 1
- Back button incorrectly redirecting HOT 2
- Civic Tech Organizations Page currently includes "%20" in query when back button is used HOT 1
- Update NavBar lower padding HOT 1
- Org Icons on site, but not on local
- Update FAQ: How do I add my organization to Civic Tech Index?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cti-website-frontend.