Skip to content

Conversation

@JakobDev
Copy link
Contributor

@JakobDev JakobDev commented Jan 30, 2023

This adds the date a repo is archived to Gitea and shows it in the UI and API. A feature, that GitHub has been introduced recently.

I currently don't know how to correctly deal with the Date in the template, as different languages have different Ways of writing a date.

grafik

@a1012112796 a1012112796 added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jan 30, 2023
@lunny lunny added this to the 1.20.0 milestone Jan 30, 2023
@silverwind
Copy link
Member

I currently don't know how to correctly deal with the Date in the template, as different languages have different Ways of writing a date.

This ISO format in the screenshot is pretty universal I'd say.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 30, 2023
@silverwind
Copy link
Member

Lint is failing:

+ make lint-backend
go run github.com/golangci/golangci-lint/cmd/[email protected] run

modules/timeutil/timestamp.go:65:9: indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)
	} else {
		timePointer := ts.AsTimeInLocation(setting.DefaultUILocation)
		return &timePointer
	}

@yardenshoham
Copy link
Member

I currently don't know how to correctly deal with the Date in the template, as different languages have different ways of writing a date.

You can utilize the automatic time rendering function as in #21440

@yardenshoham
Copy link
Member

Try to use the time elements introduced in #23988

@JakobDev
Copy link
Contributor Author

Try to use the time elements introduced

I'm not sure if this fits well, as it works with relative time. This could be cause Problems in some Languages, as this is used within a sentence. I also think we should only show the Date.

@yardenshoham
Copy link
Member

It can also handle absolute dates but it's in a go template, not a utility function. I'll make it easier to use soon

@silverwind
Copy link
Member

Yeah, absolute time is fine here, so I don't see time-elements as required for this. It'll be good to have because depending on user's time zone, the day of archival could shift.

@silverwind
Copy link
Member

@JakobDev please resolve any open resolved discussions so it's easier for reviewers to track the status.

@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 25, 2023
@yardenshoham
Copy link
Member

@JakobDev please update the description with up-to-date screenshots

@lunny
Copy link
Member

lunny commented Apr 25, 2023

need @lafriks 's approval

@yardenshoham yardenshoham removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 25, 2023
@delvh delvh added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 25, 2023
@delvh
Copy link
Member

delvh commented Apr 25, 2023

Note for maintainers:
Postpone the merge for at most two days.
It would indeed be good if the screenshots were updated to the latest state.
Apart from that, this PR fulfills the requirement to be merged.

@yardenshoham
Copy link
Member

If we postpone the merge we should remove the reviewed/wait-merge label. The bot will keep synching this PR, only this PR as its number is the lowest among the PRs pending merge. Essentially blocking the merge queue.

@yardenshoham yardenshoham removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 25, 2023
@JakobDev
Copy link
Contributor Author

please update the description with up-to-date screenshots

As I'm currently not on my Dev machine, I had updated the Description with the Screenshot from silberwind. i hope that's OK.

@silverwind silverwind self-requested a review April 25, 2023 22:33
@delvh delvh added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 26, 2023
@delvh delvh changed the title Add archive date Display when a repo was archived Apr 26, 2023
@techknowlogick techknowlogick enabled auto-merge (squash) April 26, 2023 14:34
@techknowlogick techknowlogick merged commit c41bc4f into go-gitea:main Apr 26, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 26, 2023
@JakobDev JakobDev deleted the archivedate branch April 26, 2023 14:48
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/feature Completely new functionality. Can only be merged if feature freeze is not active.