Commit Graph

19 Commits

Author SHA1 Message Date
Paul Gschwendtner b5ab7aff43 refactor: add override keyword to members implementing abstract declarations (#42512)
In combination with the TS `noImplicitOverride` compatibility changes,
we also want to follow the best-practice of adding `override` to
members which are implemented as part of abstract classes. This
commit fixes all instances which will be flagged as part of the
custom `no-implicit-override-abstract` TSLint rule.

PR Close #42512
2021-07-12 13:11:17 -07:00
Paul Gschwendtner 67f65a9d25 refactor(dev-infra): improve type-safety of git client utility (#42468)
Currently the `GitClient` accepts a generic parameter for determining
whether the `githubToken` should be set or not. This worked fine so far
in terms of distinguishing between an authenticated and
non-authenticated git client instance, but if we intend to conditionally
show methods only for authenticated instances, the generic parameter
is not suitable.

This commit splits up the `GitClient` into two classes. One for
the base logic without any authorization, and a second class that
extends the base logic with authentication logic. i.e. the
`AuthenticatedGitClient`. This allows us to have specific methods only
for the authenticated instance. e.g.

  * `hasOauthScopes` has been moved to only exist for authenticated
    instances.
  * the GraphQL functionality within `gitClient.github` is not
    accessible for non-authenticated instances. GraphQL API requires
    authentication as per Github.

The initial motiviation for this was that we want to throw if
`hasOAuthScopes` is called without the Octokit instance having
a token configured. This should help avoiding issues as within
3b434ed94d
that prevented the caretaker process momentarily.

Additionally, the Git client has moved from `index.ts` to
`git-client.ts` for better discoverability in the codebase.

PR Close #42468
2021-06-03 14:34:33 -07:00
Joey Perrott e1c5cea2e7 fix(dev-infra): set the default LogLevel of GitClient logging to DEBUG (#41899)
Previously by default GitClient would log the commands it was executing at the
INFO level. This change moves the default level of this logging to DEBUG, while
still allowing callers of the methods to set the log level back to INFO.

PR Close #41899
2021-05-07 10:15:20 -04:00
Joey Perrott dd4c3dba3f refactor(dev-infra): move `getRepoBaseDir()` to `GitClient` (#41527)
As `getRepoBaseDir()` relies on git, it should be a method on `GitClient` for retrieval
rather than its own utility outside of the common GitClient used for all git ineractions.

PR Close #41527
2021-04-15 11:28:12 -07:00
Joey Perrott 9bf8e5164d refactor(dev-infra): use a singleton for GitClient (#41515)
Creates a singleton class for GitClient rather than relying on creating an instance to
require being passed around throughout its usages.

PR Close #41515
2021-04-12 16:43:54 -07:00
Charles Lyding 318255a5f8 build: support building with TypeScript 4.1 (#39571)
TypeScript 4.1 is now used to build and test within the repository.

PR Close #39571
2020-11-25 11:10:01 -08:00
Joey Perrott 2d79780384 fix(dev-infra): run caretaker checks asyncronously (#39086)
Run each check in the caretaker check process asyncronously.

PR Close #39086
2020-11-03 16:32:59 -08:00
Joey Perrott 8106a7a11b fix(dev-infra): clean up output of `caretaker check` command (#39474)
Suppress the logging of the git command executed during the caretaker
check process.

PR Close #39474
2020-10-29 09:55:26 -07:00
Joey Perrott d331e09b71 refactor(dev-infra): create ng-dev executable locally in the repo (#39089)
Rather than running ng-dev via ts-node, going forward ng-dev is generated and run
locally via node.  Additionally, the generated file is tested on each commit to
ensure that the local generated version stays up to date.

PR Close #39089
2020-10-22 13:36:14 -07:00
Joey Perrott 34dbba4a90 refactor(dev-infra): remove branches created for g3 comparison (#39137)
Previously, temporary branches were created to be used for comparison to
the g3 branch, instead comparisons are now done using the branches
latest shas.

PR Close #39137
2020-10-15 14:11:31 -07:00
Andrew Scott b2342d4116 feat(dev-infra): Add github links to caretaker checks (#39185)
This commit adds links to the PR/Issue for queries in the caretaker check.

PR Close #39185
2020-10-09 09:39:33 -07:00
Joey Perrott f3150223da feat(dev-infra): show CI status of all active release trains (#39067)
As part of the ng-dev caretaker check command, show the status of the
lastest CircleCI run for each active release train.

PR Close #39067
2020-10-05 10:23:34 -07:00
Joey Perrott f7213cb57a fix(dev-infra): correct matching logic for g3 comparison (#39084)
Corrects the matching logic for g3 comparison check, previously more matches were
found than were correct.

PR Close #39084
2020-10-01 15:27:13 -07:00
Joey Perrott 21213e1531 fix(dev-infra): run git fetch in quiet mode (#39068)
Runs git fetch with the -q flag during fetch while comparing the master and
g3 branches.

PR Close #39068
2020-10-01 09:30:15 -07:00
Paul Gschwendtner 758d0e2045 refactor(dev-infra): share more github code between commands (#38656)
Instead of repeating the logic for adding the github token to
a repository git url, we add a shared function for automatically
computing the URls with token.

Additionally, URLs for updating/generating tokens have been moved
to a dedicated file in the `utils` folder. Also while being at it,
the yargs github token helper is also moved into the dedicated
Git/Github related util folder.

PR Close #38656
2020-09-28 16:11:38 -04:00
Joey Perrott 722699fb0c fix(dev-infra): handle no caretaker config being defined (#38862)
Properly handle cases where no caretaker config is provided to ng-dev commands

PR Close #38862
2020-09-16 15:22:10 -07:00
Joey Perrott b9ca6d20cc feat(dev-infra): include CI status check in the caretaker check (#38779)
Add a CI status check in the ng-dev caretaker check command.

PR Close #38779
2020-09-15 08:45:02 -07:00
Joey Perrott 6768fe9927 fix(dev-infra): correct build setup for dev-infra (#38815)
Correct's the missing dependencies and incorrect build dependencies for the
dev-infra bazel targets.

PR Close #38815
2020-09-11 13:59:30 -07:00
Joey Perrott a6f3cd93a9 feat(dev-infra): check services/status information of the repository for caretaker (#38601)
The angular team relies on a number of services for hosting code, running CI, etc. This
tool allows for checking the operational status of all services at once as well as the current
state of the repository with respect to merge and triage ready issues and prs.

PR Close #38601
2020-09-01 13:05:30 -07:00