Skip to content

Conversation

@LaoQi
Copy link
Contributor

@LaoQi LaoQi commented Feb 6, 2025

Basic support for #33484

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 6, 2025
@github-actions github-actions bot added modifies/translation modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/migrations labels Feb 6, 2025
@LaoQi LaoQi closed this Feb 6, 2025
Copy link
Member

@techknowlogick techknowlogick left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!
A few tiny things that did it so far.

</div>
<div class="field">
<label for="secret-description">{{ctx.Locale.Tr "secrets.creation.description"}}</label>
<input autofocus
Copy link
Member

Choose a reason for hiding this comment

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

Probably best to leave autofocus off of this field as the others already

@@ -0,0 +1,20 @@
// Copyright 2024 The Gitea Authors. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

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

2025

</div>
<div class="field">
<label for="dialog-variable-description">{{ctx.Locale.Tr "secrets.creation.description"}}</label>
<input autofocus
Copy link
Member

Choose a reason for hiding this comment

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

Same as above

Name: "description",
Description: "some description",
ExpectedStatus: http.StatusCreated,
},
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a test that leaves out the description field, just to ensure that it'll fall back to the default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These tests only check if descriptions can be written. In reality, the default tests written at api_repo_secrets_test.go#L33 are cases without descriptions. I haven’t thought of any other test cases yet. Any suggestions?

@techknowlogick
Copy link
Member

@LaoQi i saw you closed this, was that intentional?

@LaoQi
Copy link
Contributor Author

LaoQi commented Feb 6, 2025

There too many lint error on it. After re-linting the code, I will submit a new pull request.

@go-gitea go-gitea locked as resolved and limited conversation to collaborators May 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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 modifies/migrations modifies/templates This PR modifies the template files modifies/translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants