Skip to content

feat: public API createTag endpoint - #8212

Closed
Meldiron wants to merge 5 commits into
gogs:mainfrom
Meldiron:copilot/add-create-tag-endpoint
Closed

Meldiron wants to merge 5 commits into
gogs:mainfrom
Meldiron:copilot/add-create-tag-endpoint

Conversation

@Meldiron

Copy link
Copy Markdown
Contributor

Agent-Logs-Url: https://github.com/Meldiron/gogs/sessions/d126eea8-75ed-4bc7-b1b5-e0b89e7081c7

Describe the pull request

Adds public API with ability to create tag using API directly, for improved feature-parity with industry standard.

Link to the issue: #8209

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code or have provided the test plan. (if applicable)
  • I have added an entry to CHANGELOG. (if applicable)

Test plan

New test added for both success and failure (4xx) flows, as described in issue.

## Additional info

This PR was made by AI, but I am available to address PR comments manually. I self-reviewed before submitting changes.

@Meldiron
Meldiron requested a review from unknwon as a code owner March 24, 2026 09:19
@Meldiron Meldiron mentioned this pull request Mar 24, 2026
1 task done
// SetMockHandle sets the global database Handle to a DB backed by the given
// gorm.DB instance for the duration of the test, restoring the original value
// when the test completes.
func SetMockHandle(t *testing.T, db *gorm.DB) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not big fan of this, but seems needed. It's a new scenario when createTag under the hood ends up calling database for GetByEmail (user). It seems to be the only test outside of internal/database that needs this.

Open to suggestions, if there is better way to resolve this

@Meldiron Meldiron mentioned this pull request Mar 24, 2026
1 task done
@Meldiron

Copy link
Copy Markdown
Contributor Author

Closed due to inactivity

@Meldiron Meldiron closed this Sep 21, 2026
@unknwon unknwon mentioned this pull request Nov 15, 2026
4 tasks done
unknwon added a commit that referenced this pull request Nov 15, 2026
Meldiron proposed and implemented creating tags through the API in #8212.

Co-authored-by: Meldiron <[email protected]>
unknwon added a commit that referenced this pull request Nov 17, 2026
Meldiron proposed and implemented creating tags through the API in #8212.

Co-authored-by: Meldiron <[email protected]>
unknwon added a commit that referenced this pull request Nov 18, 2026
Meldiron proposed and implemented creating tags through the API in #8212.

Co-authored-by: Meldiron <[email protected]>
unknwon added a commit that referenced this pull request Nov 18, 2026
Meldiron proposed and implemented creating tags through the API in #8212.

Co-authored-by: Meldiron <[email protected]>
unknwon added a commit that referenced this pull request Nov 18, 2026
Meldiron proposed and implemented creating tags through the API in #8212.

Co-authored-by: Meldiron <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants