Also fixes git cl description <url> by propagating codereview host information
in all cases.
BUG=681704
R=agable@chromium.org
Change-Id: Ia79c10b19d72b5a8797a1428ad8a79c8f4480901
Reviewed-on: https://chromium-review.googlesource.com/431036
Reviewed-by: Aaron Gable <agable@chromium.org>
This CL moves JS formatting behind the --js flag for git cl format
due to issue with LayoutTests. It also adds an option to check
javascript for the presubmit canned formatting check.
BUG=567770
Change-Id: I9c080b1136f6ffef9fb1b08d3bfc97ce5b3185dc
Reviewed-on: https://chromium-review.googlesource.com/430526
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Christopher Lam <calamity@chromium.org>
This way we avoid extra RPC to codereview site.
R=sergiyb@chromium.org
BUG=681704
Change-Id: I81f9ac1b8fe4cfaa95458a5669735168185c47e5
Reviewed-on: https://chromium-review.googlesource.com/430639
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Previously, 1 CL was queried first, followed by all remaining ones
in parallel. The purpose was to ensure that valid authentication
token is present. However, it still required one call to Rietveld
or Gerrit, needlessly increasing latency.
This CL first loops over all CLs and ensures that credentials are
present, refreshing refresh tokens for Rietveld if necessary. Then,
all CLs are queried in parallel.
R=sergiyb@chromium.org,clemensh@chromium.org
BUG=681704
Change-Id: Ic125ac7c2a684d6f3c34e4e8b899192abbed01bb
Reviewed-on: https://chromium-review.googlesource.com/431033
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
This reverts commit 66c50ea1f1.
Reason for revert:
Breaks some OWNERS checks. See https://crbug.com/684270 for details.
Original change's description:
> Fix OWNERS canned check to avoid duplicate output.
>
> 1. Update PanProjectChecks() to supply source_filter to CheckOwners().
> This prevents files under e.g. third_party/WebKit being checked both
> by the top-level and sub-directory PRESUBMIT rules.
> 2. Fix CheckOwners() to list missing-OWNERS only for the sub-directory
> it is invoked on, rather than the whole CL. This prevents files under
> sub-directories with their own PRESUBMIT rule, within the same repo,
> from causing OWNERS to be checked for files outside that directory.
>
> BUG=
>
> Reviewed-on: https://chromium-review.googlesource.com/426003
TBR=wez@chromium.org,dcheng@chromium.org
BUG=684270
Change-Id: I094818a6fa3e16fbac0d37d2596a40210611ee05
Reviewed-on: https://chromium-review.googlesource.com/431656
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
We have to clean up the title, but if the user hasn't expressed any
input about the title (i.e. it's one we autogenerated), then don't
bother them by pointing it out.
BUG=684079
Change-Id: I8215e0a30f786466697fe1df178ca90e1980d9b0
Reviewed-on: https://chromium-review.googlesource.com/431162
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrew Bonventre <andybons@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Git cl decides if git-numberer is enabled on a repository by writing
Gerrit's project.config from refs/meta/config into a tempfile, which is
then queried using `git config -f tempfile --get ...`. The file itself
is only flushed, but not closed after writing because Python's
tempfile.NamedTemporaryFile is deleted on closing. This worked fine on
Linix/Mac, but not on Windows, where `git config` apparently doesn't see
file or its contents.
This CL rewrites the above using yet another contexmanager temp
directory into which a file is written and closed before git config is
ran.
R=machenbach@chromium.org,grt@chromium.org
BUG=683202
Change-Id: I7974d66b1b2b0478ab4b6f7ac04e547a4981c46c
Reviewed-on: https://chromium-review.googlesource.com/430719
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
This CL adds .js to the list of file extensions that get clang-formatted.
BUG=567770
Change-Id: Ieed162a84ca68877e5107da1824b1f49c71d51ed
Reviewed-on: https://chromium-review.googlesource.com/429551
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Dan Beam <dbeam@chromium.org>
Its useful to be able to run clang-format on projects
outside of chromium. This change informs developers
how they can do that.
Change-Id: I01ef755aa6e5b53a0a5bb6377e92b2ffdfd17eff
Reviewed-on: https://chromium-review.googlesource.com/414204
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Sam Clegg <sbc@chromium.org>
On larger CLs, this can be used to see whether all needed LGTMs are
there on a dry run.
R=tandrii@chromium.org
Change-Id: I5fe4022feaca73d08ead9aed14ca270192740675
Reviewed-on: https://chromium-review.googlesource.com/426819
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: smut <smut@chromium.org>
This change adds the functionality to display Short URLs for issues if possible.
BUG=
Change-Id: I250f3609e853663b576b8ff1c7e27e264b179755
Reviewed-on: https://chromium-review.googlesource.com/426318
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
It looks like this regressed when we switched from specifying CCs
via the refspec arguments to using the API.
BUG=680605
Change-Id: Iabd397b639989f050932188b1a1aa488639ffbbe
Reviewed-on: https://chromium-review.googlesource.com/427344
Reviewed-by: Andrew Bonventre <andybons@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
1. Update PanProjectChecks() to supply source_filter to CheckOwners().
This prevents files under e.g. third_party/WebKit being checked both
by the top-level and sub-directory PRESUBMIT rules.
2. Fix CheckOwners() to list missing-OWNERS only for the sub-directory
it is invoked on, rather than the whole CL. This prevents files under
sub-directories with their own PRESUBMIT rule, within the same repo,
from causing OWNERS to be checked for files outside that directory.
BUG=
Change-Id: I9bd5677a69efe9c78b4174a917780d6688991a38
Reviewed-on: https://chromium-review.googlesource.com/426003
Commit-Queue: James Weatherall <wez@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
This reverts commit 15f122ee64.
Reason for revert: lots of bots are running Powershell 2. the
new step fails on them (non-fatally though, just generating
errors in the log, e.g. https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/357219/steps/ensure%20git%20tooling%20on%20windows/logs/stdio)
Original change's description:
> Allow cipd.ps1 execution even if it was fetched from depot_tools.zip.
>
> Windows keeps track of files downloaded from the Internet and powershell by
> default refuses to execute them (even with RemoteSigned policy). We need to
> explicitly unblock the file first.
>
> Note: it requires Powershell >= 3.0.
>
> R=dpranke@chromium.org, iannucci@chromium.org
> BUG=663843
>
> Change-Id: Id681f4058f906fa4782a360be184d132d837ae78
> Reviewed-on: https://chromium-review.googlesource.com/424327
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
>
TBR=iannucci@chromium.org,vadimsh@chromium.org,dpranke@chromium.org,chromium-reviews@chromium.org
BUG=663843
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ibdc58e60d3f35a760de45bc1f71c88c1c4d2f2df
Reviewed-on: https://chromium-review.googlesource.com/424872
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Windows keeps track of files downloaded from the Internet and powershell by
default refuses to execute them (even with RemoteSigned policy). We need to
explicitly unblock the file first.
Note: it requires Powershell >= 3.0.
R=dpranke@chromium.org, iannucci@chromium.org
BUG=663843
Change-Id: Id681f4058f906fa4782a360be184d132d837ae78
Reviewed-on: https://chromium-review.googlesource.com/424327
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
This is a follow-up to https://chromium-review.googlesource.com/c/419148/;
the purpose is to confirm that the behavior is how we want it to be when
there are presubmit errors and warnings.
BUG=671683
Change-Id: I5b295c200d3db1a374e4294bdd78a777ae36c832
Reviewed-on: https://chromium-review.googlesource.com/420975
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
None of these methods are called anymore.
BUG=475320
Change-Id: I2f21a326069cf3e65af179f4e61fa15093b73b07
Reviewed-on: https://chromium-review.googlesource.com/423122
Reviewed-by: Katie Thomas <katthomas@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>