Skip to content
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

Add spent time to referenced issue in commit message #12220

Merged
merged 3 commits into from
Sep 4, 2020

Conversation

lafriks
Copy link
Member

@lafriks lafriks commented Jul 12, 2020

Add support to specify spent time in commit message that will be added to references issue/PR.

Allows to specify time only for issues/PR that will be closed.

Time spent must be specified after issue/PR number in message.

Time should start with @ symbol and must contain time format, ex. @1h10m - would mean 1 hour and 10 minutes.

It is possible to log time for multiple issues, ex:

Fixed #123 spent @1h, refs #102, fixes #124 @1.5h

Following time units are supported:

  • mo - month (equals to 4 weeks)
  • w - week (equals to 5 days)
  • d - day (equals to 8 hours)
  • h - hour
  • m - minutes

Screenshot:
image

@lafriks lafriks added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/changelog Adds the changelog for a new Gitea version labels Jul 12, 2020
@lafriks lafriks added this to the 1.13.0 milestone Jul 12, 2020
@lafriks lafriks force-pushed the feat/spent_time_commit branch from 370a352 to 95191e7 Compare July 12, 2020 01:43
@silverwind
Copy link
Member

Seems a good feature but hard to discover. Maybe add some docs somewhere for all the triggers we support in commit title/message?

Once thing I've noticed it that one cannot commit time to an issue without closing it. I think that should be allowed:

image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 31, 2020
@zeripath
Copy link
Contributor

Agree with @silverwind - this will need some documentation. I guess it could go in to the FAQ?

@lafriks
Copy link
Member Author

lafriks commented Aug 28, 2020

@silverwind yes it is meant to work for scenario when issue is fixed by commit. Later it could be improved to work on referenced issues also. I will try to work on some docs

@lafriks lafriks force-pushed the feat/spent_time_commit branch from 95191e7 to 3401bc6 Compare September 2, 2020 08:49
@lafriks
Copy link
Member Author

lafriks commented Sep 2, 2020

@silverwind documentation added in docs section Automatically Linked References

@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2020

Codecov Report

Merging #12220 into master will increase coverage by 0.00%.
The diff coverage is 37.73%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #12220   +/-   ##
=======================================
  Coverage   43.30%   43.31%           
=======================================
  Files         646      646           
  Lines       71567    71616   +49     
=======================================
+ Hits        30994    31017   +23     
- Misses      35556    35580   +24     
- Partials     5017     5019    +2     
Impacted Files Coverage Δ
modules/repofiles/action.go 53.29% <0.00%> (-10.95%) ⬇️
modules/references/references.go 79.60% <90.90%> (+0.72%) ⬆️
modules/indexer/stats/queue.go 64.70% <0.00%> (-11.77%) ⬇️
modules/indexer/stats/db.go 43.47% <0.00%> (-8.70%) ⬇️
models/issue_comment.go 53.90% <0.00%> (+0.15%) ⬆️
models/error.go 35.32% <0.00%> (+0.51%) ⬆️
modules/log/event.go 59.43% <0.00%> (+1.88%) ⬆️
services/pull/check.go 50.00% <0.00%> (+2.30%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c557ef...7bf09db. Read the comment docs.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 4, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Sep 4, 2020
@lafriks
Copy link
Member Author

lafriks commented Sep 4, 2020

🚀

@techknowlogick techknowlogick merged commit e710a34 into go-gitea:master Sep 4, 2020
@lafriks lafriks deleted the feat/spent_time_commit branch September 4, 2020 15:38
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
@delvh delvh removed the type/changelog Adds the changelog for a new Gitea version label Oct 7, 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants