Skip to content

feat: expansion of gitea api to handle columns #31768

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

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

eyad-hussein
Copy link

@eyad-hussein eyad-hussein commented Aug 2, 2024

Resolves #31769

Implementation details:

  • Create a columnAssignment middleware similar to the middlewares already implemented(eg orgAssignment) to extract the ContextUser. After that, the other middlewares will check if the doer has the necessary permissions to execute the request.
  • Create necessary handlers for each endpoint

Projects:

  • PATCH /projects/{project_id}/{action:close|open}
  • PUT /repos/{owner}/{repo}/projects/{type:issues|pulls}

Columns:

  • GET /projects/columns/{column_id}
  • PATCH /projects/columns/{column_id}
  • DELETE /projects/columns/{column_id}
  • GET /projects/{project_id}/columns
  • POST /projects/{project_id}/columns
  • PATCH /projects/{project_id}/columns/move
  • PATCH /projects/{project_id}/columns/{column_id}/move
  • PUT /projects/columns/{column_id}/default

Tests

  • Tests

Other endpoints for projects are implemented but i can remove them from the pr if requested.

…ts and crud operations

create endpoints for each operation in the web router and corresponding handler and tested them manually
edit project api response format to include more fields
introduce new logic to handle project and column assignment, refactor everything and removed unnecessary code, create swagger docs
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 2, 2024
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels Aug 2, 2024
@eyad-hussein eyad-hussein changed the title Development expansion of gitea api to handle columns Aug 2, 2024
@eyad-hussein eyad-hussein changed the title expansion of gitea api to handle columns feat: expansion of gitea api to handle columns Aug 2, 2024
@eyad-hussein eyad-hussein marked this pull request as draft August 7, 2024 11:36
@GamerGirlandCo
Copy link

one thing to note is that these endpoints appear to only work with the access_token query param, which has been marked as deprecated in favour of authorization headers. other than that, awesome work! hope to see this merged in a timely fashion :D

@techknowlogick
Copy link
Member

@eyad-hussein thanks for this PR! Even though tests aren't yet included, is it okay if a review is started for the rest of the code?

@eyad-hussein
Copy link
Author

@techknowlogick Sure, feel free to start reviewing the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API support for columns
4 participants