-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Revise Prebuilds Page #4970
Revise Prebuilds Page #4970
Conversation
Looking at this now! 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up @AlexTugarev! Left some comments below. 🏀
Added a follow up issue in #4972 about project search as it seems to be out of the scope of this PR. For some reason, I could not see any prebuilds entries or open a prebuild page. 😭
b0443bd
to
4e556b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the deployment, @AlexTugarev! Added a few more comments below! 🍍
4e556b8
to
70d5874
Compare
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
70d5874
to
1f066dc
Compare
if (!filter(branch)) { | ||
return undefined; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Wouldn't it be cleaner to filter out branches before the .map
? E.g. like so:
{branches.filter(filter).map((branch, index) => {
// ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good! will apply in the following PR.
@@ -71,7 +78,8 @@ export class ProjectsService { | |||
changeUrl: "changeUrl", // todo: compute in repositoryProvider | |||
}); | |||
} | |||
return result; | |||
result.sort((a, b) => (b.changeDate || "").localeCompare(a.changeDate || "")); | |||
return result.slice(0, 30); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Out of curiosity, why limit this to 30 in the backend, as opposed to in the front-end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
@@ -1461,7 +1461,7 @@ export class GitpodServerEEImpl extends GitpodServerImpl<GitpodClient, GitpodSer | |||
return repositories; | |||
} | |||
|
|||
async triggerPrebuild(projectId: string, branch: string): Promise<void> { | |||
async triggerPrebuild(projectId: string, branchName: string): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I understand that public
is the default, but maybe not every developer that ever looks at this code will know that. Also, I think it's slightly dangerous to be inconsistent in this file (e.g. if you see both public async
and async
, you might accidentally think the second is private by default).
Please either respect the file-local convention (i.e. explicit public
keyword), or refactor the entire file in a separate commit (i.e. remove all the public
prefixes).
@@ -26,6 +26,11 @@ export class BitbucketRepositoryProvider implements RepositoryProvider { | |||
return { host, owner, name, cloneUrl, description, avatarUrl, webUrl }; | |||
} | |||
|
|||
async getBranch(user: User, owner: string, repo: string, branch: string): Promise<Branch> { | |||
// todo | |||
throw new Error("not implemented"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: When will we implement the Bitbucket and GitLab methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Planing to implement GitLab support tomorrow.
No plans for BitBucket so far. TODO: remove from selection list for the time being.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modulo the few nits / questions / suggestions, this change looks good to me and can be merged! Many thanks!
/lgtm
/hold
LGTM label has been added. Git tree hash: c1c1d71d4c1f0bb36a030dbb29a3fdb143537cdb
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AlexTugarev, jankeromnes Associated issue: #4958 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
using a couple of graphql queries instead of many rest requests. ordering by change date. limiting to 30 items.
1f066dc
to
88b36e9
Compare
New changes are detected. LGTM label has been removed. |
Still /lgtm 😁 many thanks! |
/unhold |
Addressing issues from #4958