-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
feat: api endpoints for projects #28111
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
base: main
Are you sure you want to change the base?
Conversation
@dineshsalunke Is the PR still WIP or is it ready for review? |
@denyskon this one is ready for review |
looks good to me! |
@dineshsalunke I see a lot of unrelated formatting changes, maybe originating from your editor formatter or similar. Could you revert them? |
@denyskon I have fixed the golines formatting and pushed. I will still check on it and get back |
@dineshsalunke Thank you, however unfortunately some are still remaining in |
Also, some methods seem to have broken when updating to main. Could you take a look please? |
If you don't mind, I think maintainers can help update the pull request. |
services/convert/project.go
Outdated
Closed: project.ClosedDateUnix.AsTime(), | ||
} | ||
|
||
_ = project.LoadRepo(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return error should be handled.
@lunny I noticed that the board related models have been renamed to Column and Template, so do we wanna update all the properties in the payloads and responses accordingly ? If we change them wouldn't that be a breaking change |
At the moment, I prefer to change the names as more as possible but keeping compatible. You can find I didn't change the table name and some places in my original PR. |
// required:true | ||
Title string `json:"title" binding:"Required"` | ||
// required:true | ||
BoardType uint8 `json:"board_type"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TemplateType to align with other places?
routers/api/v1/api.go
Outdated
m.Combo("/{id}").Get(projects.GetProject). | ||
Patch(bind(api.UpdateProjectPayload{}), projects.UpdateProject). | ||
Delete(projects.DeleteProject) | ||
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryIssue), reqToken()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a new token scope AccessTokenScopeCategoryProject
.
@dineshsalunke I would like to review this PR for 1.25. Could you update it (and the boards pr too) to be in sync with main? |
@denyskon Surely I will update the PR |
@denyskon I have pushed some changes for now, which only include the POST methods the test's are passing for them. Work on PR was slow due to the fact that I didn't had a clear way to handle permissions for /org and /repos routes. I will look into the permissions thing now for all the POST methods and will push those changes first if the approach looks good to others then I will move with implementing rest of the routes |
Fixes #14299
My earlier PR #20208 went too long and became messy, so I am closing that one and will be splitting the work in smaller chunks.
This PR includes all the endpoints for the Projects
For all the endpoints related to Boards I will be raising another PR for the same.