Tipp
[en] The term "Git hosting" refers to all services used to host Git repositories.
[en] You decide what you check! Choose from a range of options to define what Acrolinx checks for you.
Wichtig
[en] Note that the file size limit for pull request events from GitHub is 100 MB.
[en] For GitHub:
:allowed-event-types ["pull_request"]
[en] For Azure DevOps:
:allowed-event-types ["git.pullrequest.created" "git.pullrequest.updated"]
[en] Acrolinx can process several Git event types. To limit the event types, no matter what a repository admin may configure in a Git hosting provider, create a vector of the allowed event types as found in the Git request header.
[en] The following GitHub pull request event types are currently supported: “opened“, “reopened“, and “synchronize“. Acrolinx will ignore all other events.
[en] When running the webhook with both Git service providers at the same time, please add all event types to this configuration option.
[en] Acrolinx doesn't support the ENV and system property. The default is nil
, which allows all known event types. You can set this in the repository configuration.
:ignored-senders ["ocotcat"]
[en] In Git hosting providers, every event has a sender: the user who started the event. Acrolinx allows you to filter them. Create a vector with the exact senders that you want to ignore.
[en] The configuration option :ignored-senders
needs to be used differently with GitHub and Azure DevOps due to differences in the APIs of those services. The sender is described as follows:
-
[en] GitHub: username
-
[en] Azure DevOps: email address
[en] This doesn't support the ENV and system property. The default is nil
, which allows events from all senders.
:allowed-branchname-matches "main" :allowed-branchname-matches ["^main$" "release-.*"]
[en] Your repository can have several branches. All branches are checked by default. You can use this setting to filter the branches that you want Acrolinx to check. If you're only interested in 1 branch, set it to a string value.
[en] If you want to allow checking on several branches, set it to a vector value. Also, you can use regular expressions.
[en] This supports ENV and system property for a single value. The default is nil
, but you can adjust this in the repository configuration. The regular expressions are of the Java flavor. Note that this is a string representation and may require extra escaping.
:allow-merges-from-default true
[en] You can merge changes from the default branch into another branch in the same repository when synchronizing changes across branches. By default, Acrolinx doesn't check these merges. Set this value to true
to enable merge checking from the default branch. This only applies to pull requests.
[en] This supports ENV and system property. The default is nil
, but you can adjust this in the repository configuration.
:use-skip-label true
[en] By default, Acrolinx allows you to skip pull request checking with the label skip-acrolinx
. You can't configure the label itself, but you can turn off the skipping with :use-skip-label
to false
. This only applies to pull requests.
[en] This configuration option refers to the pull request label in GitHub and to the pull request tag in Azure DevOps. The terminology is different for each git hosting provider.
[en] This supports ENV and system property. The default is true, but you can adjust this in the repository configuration.
:ignored-filetypes ["XML" "TEXT"]
[en] Now that the branches are set, which files do you want to check? By default, Acrolinx for Git Hosting checks all file types that Acrolinx supports. These include XML, HTML, plain text, and Markdown files.
[en] Acrolinx recognizes each type by its extension. You can add more types and extensions if your Acrolinx Platform supports it. Ask Acrolinx Support for details on how to set this up. If you don't want to check certain file types, set the variable :ignored-filetypes
.
[en] This variable is only supported in the configuration files and defaults to nil
.
:allowed-filename-matches ["^doc/.*" "articles/"]
[en] You can configure one or a list of regular expressions to filter on the full path of the changed file.
[en] This supports ENV and system property for single value. The default is nil
, but you can adjust this in the repository configuration.
:changed-files-limit 50
[en] You can set a maximum number of files to be checked for push and pull requests. Not setting it or setting it to 0 disables the limit. You can use any positive integer. To avoid unnecessary checks, be sure to set this value.
Warnung
[en] This limit can't be set for baseline checks.
[en] This supports ENV and system property. The default is nil
, but you can override it globally through the remote global configuration or the repository configuration.
Hinweis
[en] Files deleted in one of the processed commits are automatically filtered.
[en] Before Acrolinx for Git Hosting submits a check to Acrolinx, it receives an alphabetized list of the changed files and truncates the list based on :changed-files-limit
. That means that Acrolinx will only check the files at the top of the list.
[en] If you want to write regular expressions (regex) in Acrolinx for Git Hosting, here are some things to consider:
-
[en] The base syntax is Java Regular Expression.
-
[en] Enter backslashes twice. For example, the doc character needs to be represented with:
\\.
-
[en] Partial matches count as a match. If you want to match a complete string, use the start and end of line anchors:
^ start of line anchor $ end of line anchor
-
[en] The boolean "OR" logic applies when you use the vector form.
["foo" "bar"] will match all strings that include either "foo" or "bar"
-
[en] Don't use vectors with negative lookaheads (to ignore specific entries). The boolean "OR" logic may cause unexpected results:
["foo" "(?!^.*\\.yml$)"] will match foo.yml
-
[en] Use start and end of line anchors if using several negative lookaheads to combine different exclusion criteria. For example:
"(?i)(?!(^.*/f|^f)oo[^/]*$)(?!^.*\\.yml$)^(dir1|dir2)/.*$"
[en] This regex will match all files in the directories
dir1
anddir2
with names that don't start withfoo
and that don't end with.yml
. This regex will be case insensitive.