Skip to content

Add private dotfiles repo support #7569

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

Merged
merged 1 commit into from
Feb 9, 2022
Merged

Add private dotfiles repo support #7569

merged 1 commit into from
Feb 9, 2022

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Jan 12, 2022

Description

Add private dotfiles repo support

Related Issue(s)

Fixes #7565

How to test

go to preview environment

  1. set the private dotfiles repo
  2. grant repo scope in Git Provider in order to access private repo
  3. start a workspace and check ~/.dotfiles.log

Release Notes

Support private dotfiles repo

Documentation

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from iqqbot after the PR has been reviewed.

Associated issue: #7565

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov
Copy link

codecov bot commented Jan 12, 2022

Codecov Report

Merging #7569 (2088625) into main (6e8e2a5) will increase coverage by 18.99%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #7569       +/-   ##
===========================================
+ Coverage   11.98%   30.97%   +18.99%     
===========================================
  Files          20       37       +17     
  Lines        1193     5814     +4621     
===========================================
+ Hits          143     1801     +1658     
- Misses       1046     3877     +2831     
- Partials        4      136      +132     
Flag Coverage Δ
components-gitpod-cli-app 10.82% <ø> (ø)
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?
components-supervisor-app 35.28% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/supervisor/pkg/supervisor/supervisor.go 5.23% <0.00%> (ø)
components/local-app/pkg/auth/auth.go
components/local-app/pkg/auth/pkce.go
components/supervisor/pkg/ports/ports-config.go 80.00% <0.00%> (ø)
components/supervisor/pkg/supervisor/user.go 32.29% <0.00%> (ø)
...mponents/supervisor/pkg/supervisor/notification.go 83.95% <0.00%> (ø)
components/supervisor/pkg/dropwriter/dropwriter.go 73.46% <0.00%> (ø)
components/supervisor/pkg/ports/ports.go 59.45% <0.00%> (ø)
components/supervisor/pkg/terminal/terminal.go 64.52% <0.00%> (ø)
components/supervisor/pkg/supervisor/ssh.go 0.00% <0.00%> (ø)
... and 12 more

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 6e8e2a5...2088625. Read the comment docs.

@iQQBot
Copy link
Contributor Author

iQQBot commented Jan 14, 2022

/assign @csweichel

@stale
Copy link

stale bot commented Jan 24, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Jan 24, 2022
@iQQBot iQQBot removed the meta: stale This issue/PR is stale and will be closed soon label Jan 25, 2022
@stale
Copy link

stale bot commented Feb 5, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Feb 5, 2022
@iQQBot iQQBot force-pushed the pd/private-dotfiles branch from fe2e1f9 to 75b97e6 Compare February 7, 2022 05:20
@iQQBot iQQBot requested a review from a team February 7, 2022 05:20
@stale stale bot removed the meta: stale This issue/PR is stale and will be closed soon label Feb 7, 2022
@roboquat roboquat added size/M and removed size/S labels Feb 7, 2022
@iQQBot iQQBot requested a review from csweichel February 7, 2022 05:21
@@ -287,7 +289,8 @@ func Run(options ...RunOption) {

// We need to checkout dotfiles first, because they may be changing the path which affects the IDE.
// TODO(cw): provide better feedback if the IDE start fails because of the dotfiles (provide any feedback at all).
installDotfiles(ctx, cfg, childProcEnvvars)
// TODO(pd): // get token here
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can remove TODO

mustard-mh
mustard-mh previously approved these changes Feb 8, 2022
Copy link
Contributor

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

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

other change look good

/hold
in case someone want to look again

@iQQBot iQQBot force-pushed the pd/private-dotfiles branch from 3736724 to 2088625 Compare February 8, 2022 18:21
@mustard-mh
Copy link
Contributor

also test it by

  1. public dotfiles repo -> works
  2. private dotfiles repo without give repo permission -> got below error, I think it expected
# dotfile init failed: git clone --depth=1 --no-single-branch https://github.com/********* . failed (exit status 128): Cloning into '.'...
remote: Write access to repository not granted.
fatal: unable to access 'https://github.com/******': The requested URL returned error: 403
  1. private dotfiles repo with repo permisson -> works

It would be better if you could check if you have permissions when setting up the dotfiles repo

@mustard-mh
Copy link
Contributor

/unhold

@roboquat roboquat merged commit 072f2c8 into main Feb 9, 2022
@roboquat roboquat deleted the pd/private-dotfiles branch February 9, 2022 11:46
@gtsiolis
Copy link
Contributor

gtsiolis commented Feb 9, 2022

Woohoo! Thanks @iQQBot for adding this and @mustard-mh @csweichel for reviewing this! 🎉

@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Feb 17, 2022
@iQQBot iQQBot mentioned this pull request Feb 17, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production release-note size/M team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow users to use private repositories as a dotfiles repository
5 participants