G-Node / tonic

Framework for building services that interact with GIN
BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

Show only user's own jobs in the log #16

Closed achilleas-k closed 3 years ago

achilleas-k commented 3 years ago

The job log now only shows jobs owned by the user.

The go-gogs-client now supports getting the user's own info, so we don't need to store the username in our Client abstraction struct; the token is enough to retrieve all required information.

The UserID is finally added to all jobs stored in the db and this is used to limit the job log to the user's own jobs.

codecov[bot] commented 3 years ago

Codecov Report

Merging #16 into master will decrease coverage by 0.21%. The diff coverage is 31.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #16      +/-   ##
==========================================
- Coverage   31.33%   31.11%   -0.22%     
==========================================
  Files           9        9              
  Lines         517      527      +10     
==========================================
+ Hits          162      164       +2     
- Misses        342      350       +8     
  Partials       13       13              
Impacted Files Coverage Δ
tonic/routes.go 7.84% <0.00%> (-0.27%) :arrow_down:
tonic/service.go 63.76% <0.00%> (ø)
utonics/labproject/main.go 0.00% <0.00%> (ø)
tonic/db/job.go 67.85% <100.00%> (ø)
tonic/db/session.go 78.94% <100.00%> (-1.06%) :arrow_down:
tonic/worker/worker.go 92.30% <100.00%> (+0.47%) :arrow_up:

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 7ce2bbb...8fceb9e. Read the comment docs.