Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
4fd77e112f
commit
7c7c4fade6
|
@ -19,7 +19,7 @@ module ApplicationWorker
|
|||
|
||||
def structured_payload(payload = {})
|
||||
context = Labkit::Context.current.to_h.merge(
|
||||
'class' => self.class,
|
||||
'class' => self.class.name,
|
||||
'job_status' => 'running',
|
||||
'queue' => self.class.queue,
|
||||
'jid' => jid
|
||||
|
|
|
@ -216,7 +216,7 @@ Parameters:
|
|||
Example request:
|
||||
|
||||
```shell
|
||||
curl --request POST --header "PRIVATE_TOKEN: <your_access_token>" --header "Content-Type: application/json" \
|
||||
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --header "Content-Type: application/json" \
|
||||
--data '{"destination_storage_name":"storage2"}' "https://gitlab.example.com/api/v4/projects/1/repository_storage_moves"
|
||||
```
|
||||
|
||||
|
|
|
@ -17,9 +17,8 @@ we suggest investigating to see if a plugin exists. For instance here is the
|
|||
|
||||
## Pre-push static analysis
|
||||
|
||||
We strongly recommend installing
|
||||
[Lefthook](https://github.com/Arkweid/lefthook) to automatically check for
|
||||
static analysis offenses before pushing your changes.
|
||||
We strongly recommend installing [Lefthook](https://github.com/Arkweid/lefthook) to automatically check
|
||||
for static analysis offenses before pushing your changes.
|
||||
|
||||
To install `lefthook`, run the following in your GitLab source directory:
|
||||
|
||||
|
@ -33,10 +32,9 @@ overcommit --uninstall
|
|||
gem install lefthook && lefthook install -f
|
||||
```
|
||||
|
||||
Before you push your changes, Lefthook will then automatically run Danger checks, as well
|
||||
as RuboCop, ES Lint, HAML Lint, and SCSS Lint for the changed files.
|
||||
|
||||
This saves you time as you don't have to wait for the same errors to be detected by CI/CD.
|
||||
Before you push your changes, Lefthook then automatically run Danger checks, and other checks
|
||||
for changed files. This saves you time as you don't have to wait for the same errors to be detected
|
||||
by CI/CD.
|
||||
|
||||
Lefthook relies on a pre-push hook to prevent commits that violate its ruleset.
|
||||
If you wish to override this behavior, pass the environment variable `LEFTHOOK=0`.
|
||||
|
|
|
@ -708,15 +708,14 @@ Git [pre-commit hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)
|
|||
run tests or other processes before committing to a branch, with the ability to not commit to the branch if
|
||||
failures occur with these tests.
|
||||
|
||||
[`overcommit`](https://github.com/sds/overcommit) is a Git hooks manager, making configuring,
|
||||
[`lefthook`](https://github.com/Arkweid/lefthook) is a Git hooks manager, making configuring,
|
||||
installing, and removing Git hooks easy.
|
||||
|
||||
Sample configuration for `overcommit` is available in the
|
||||
[`.overcommit.yml.example`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.overcommit.yml.example)
|
||||
Configuration for `left` is available in the [`lefthook.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lefthook.yml)
|
||||
file for the [`gitlab`](https://gitlab.com/gitlab-org/gitlab) project.
|
||||
|
||||
To set up `overcommit` for documentation linting, see
|
||||
[Pre-commit static analysis](../contributing/style_guides.md#pre-push-static-analysis).
|
||||
To set up `lefthook` for documentation linting, see
|
||||
[Pre-push static analysis](../contributing/style_guides.md#pre-push-static-analysis).
|
||||
|
||||
#### Disable Vale tests
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ RSpec.describe ApplicationWorker do
|
|||
instance.jid = 'a jid'
|
||||
|
||||
expect(result).to include(
|
||||
'class' => worker.class,
|
||||
'class' => instance.class.name,
|
||||
'job_status' => 'running',
|
||||
'queue' => worker.queue,
|
||||
'jid' => instance.jid
|
||||
|
@ -69,7 +69,7 @@ RSpec.describe ApplicationWorker do
|
|||
it 'does not override predefined context keys with custom payload' do
|
||||
payload['class'] = 'custom value'
|
||||
|
||||
expect(result).to include('class' => worker.class)
|
||||
expect(result).to include('class' => instance.class.name)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue