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

Automatically clear stopwatch on merging a PR #4327

Merged
merged 41 commits into from
Feb 5, 2019

Conversation

adelowo
Copy link
Member

@adelowo adelowo commented Jun 27, 2018

Whenever a timer is created, it should be closed automatically whenever the PR is merged and/or an issue/PR is closed as per #4327 (comment) . This PR adds that functionality .

This uses ctx.Flash to show a one time message that the timer would be closed automatically as per #4327 (comment)

screen shot 2018-07-14 at 17 36 53

@codecov-io
Copy link

codecov-io commented Jun 27, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@5bd594c). Click here to learn what that means.
The diff coverage is 51.51%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #4327   +/-   ##
=========================================
  Coverage          ?   38.71%           
=========================================
  Files             ?      330           
  Lines             ?    48623           
  Branches          ?        0           
=========================================
  Hits              ?    18822           
  Misses            ?    27075           
  Partials          ?     2726
Impacted Files Coverage Δ
routers/repo/issue_stopwatch.go 42.1% <100%> (ø)
routers/repo/issue.go 36.56% <20%> (ø)
routers/repo/pull.go 34.14% <27.27%> (ø)
models/action.go 60.98% <55.55%> (ø)

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 5bd594c...0ccd672. Read the comment docs.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 27, 2018
@jonasfranz
Copy link
Member

I think that it might be a little bit confusing if you stop a stopwatch without telling the user. I would propose to add a hint to the UI to indicate that the stopwatch will be stopped.

@adelowo
Copy link
Member Author

adelowo commented Jun 29, 2018

Hi @JonasFranzDEV , where should that go in.. UI related things aren't what I would consider easy but could use some direction..

BTW, I was actually thinking it could more of a repo/global setting ???

@jonasfranz
Copy link
Member

@adelowo Just a hint at the submit button with the info that it will stop the stopwatch.

@lafriks
Copy link
Member

lafriks commented Jun 30, 2018

Wouldn't it be better in issue closing function. This way it would stop timer when closing issue or PR and also when merging I think

@adelowo
Copy link
Member Author

adelowo commented Jun 30, 2018

Nice one @lafriks ... I would try that out

@JonasFranzDEV Would do just that

@jonasfranz jonasfranz added the type/enhancement An improvement of existing functionality label Jul 4, 2018
@jonasfranz jonasfranz added this to the 1.6.0 milestone Jul 4, 2018
@adelowo
Copy link
Member Author

adelowo commented Jul 6, 2018

Would update this PR over the weekend

@bkcsoft
Copy link
Member

bkcsoft commented Jul 8, 2018

@JonasFranzDEV I think we could use ctx.Flash for this 🤔

@adelowo
Copy link
Member Author

adelowo commented Jul 14, 2018

Hi @lafriks , i tried that but merging a PR didn't trigger this when I placed it in the issue closing function.. I was able to do it some other way though .

@adelowo
Copy link
Member Author

adelowo commented Jul 16, 2018

This is ready to be reviewed anyways ....

@jonasfranz
Copy link
Member

Timer gets stopped if I reopen an issue. The message will be shown too if an issue is closed.

@adelowo
Copy link
Member Author

adelowo commented Jul 20, 2018

@JonasFranzDEV do you mean the timer starts again when the issue is reopened ? That doesn't happen

screen shot 2018-07-20 at 11 04 17

The message will be shown too if an issue is closed

No, the message isn't shown when the issue ( timer ) is closed (stopped)

@techknowlogick techknowlogick modified the milestones: 1.7.0, 1.8.0 Dec 19, 2018
@techknowlogick
Copy link
Member

@jonasfranz please review

@adelowo
Copy link
Member Author

adelowo commented Jan 31, 2019

Can this be reviewed please ?

@techknowlogick techknowlogick dismissed jonasfranz’s stale review January 31, 2019 17:27

This review was related to translation file which has been updated with suggestion.

@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 Jan 31, 2019
@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 Feb 1, 2019
@adelowo adelowo force-pushed the stop_watch_on_merging_pr branch from d7211a6 to 0ccd672 Compare February 5, 2019 10:10
@lafriks lafriks merged commit 5390791 into go-gitea:master Feb 5, 2019
@adelowo adelowo deleted the stop_watch_on_merging_pr branch February 5, 2019 13:57
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
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/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants