Skip to content

Commit

Permalink
Help markup (#194)
Browse files Browse the repository at this point in the history
* help: set up

* help: plural agreement

* trailing whitespace

* help: period at end of sentence

* spelling: abbreviation

* spelling: assignment

* spelling: confirmation

* spelling: conversion

* spelling: managed

* spelling: overridden

* spelling: plugin

* brand: GitHub

* help: markup variables with tt

* spelling: SHA

* spelling: multiple

* help: markup uri with tt

* help: grammar: drop stray word

* help: grammar: in the...

* help: markup user input with tt
  • Loading branch information
jsoref authored and KostyaSha committed May 28, 2018
1 parent 0b826a0 commit daa9aa5
Show file tree
Hide file tree
Showing 28 changed files with 48 additions and 48 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -34,7 +34,7 @@ Checkstyle rules are more important than this document.
1. "hungarian"-style notation is banned (i.e. instance variable names preceded by an 'm', etc)
2. If the field is `static final` then it shall be named in `ALL_CAPS_WITH_UNDERSCORES`.
3. Start variable names with a lowercase letter and use camelCase rather than under_scores.
4. Spelling and abreviations: If the word is widely used in the JVM runtime, stick with the spelling/abreviation in the JVM runtime, e.g. `color` over `colour`, `sync` over `synch`, `async` over `asynch`, etc.
4. Spelling and abbreviations: If the word is widely used in the JVM runtime, stick with the spelling/abbreviation in the JVM runtime, e.g. `color` over `colour`, `sync` over `synch`, `async` over `asynch`, etc.
5. It is acceptable to use `i`, `j`, `k` for loop indices and iterators. If you need more than three, you are likely doing something wrong and as such you shall either use full descriptive names or refactor.
6. It is acceptable to use `e` for the exception in a `try...catch` block.
7. You shall never use `l` (i.e. lower case `L`) as a variable name.
Expand Down Expand Up @@ -110,7 +110,7 @@ To the greatest extent possible, please wrap lines to ensure that they do not ex
+ Indent case statements in switch
- Wrapping
+ Change all the `Never` values to `If Long`
+ Select the checkbox for Wrap After Assignement Operators
+ Select the checkbox for Wrap After Assignment Operators
* IntelliJ, by and large the IDE defaults are acceptable with the following changes:
- Wrapping and Braces
+ Change `Do not wrap` to `Wrap if long`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -42,7 +42,7 @@ To install:

1. copy the resulting ./target/rdoc.hpi file to the $JENKINS_HOME/plugins directory. Don't forget to restart Jenkins afterwards.

2. or use the plugin management console (http://example.com:8080/pluginManager/advanced) to upload the hpi file. You have to restart Jenkins in order to find the pluing in the installed plugins list.
2. or use the plugin management console (http://example.com:8080/pluginManager/advanced) to upload the hpi file. You have to restart Jenkins in order to find the plugin in the installed plugins list.


Plugin releases
Expand Down
Expand Up @@ -128,7 +128,7 @@ public FormValidation doCreateTokenByCredentials(
fromUri(defaultIfBlank(apiUrl, GITHUB_URL)).build()),
withId(credentialsId));
if (creds == null) {
// perhaps they selected a personal credential for convertion
// perhaps they selected a personal credential for conversion
creds = firstOrNull(lookupCredentials(
StandardUsernamePasswordCredentials.class,
Jenkins.getInstance(),
Expand Down
Expand Up @@ -115,7 +115,7 @@ private boolean checkIsApplicableItem() {

/**
* This method called when root action receives webhook from GH and this extension is interested in such
* events (provided by {@link #events()} method). By default do nothing and can be overrided to implement any
* events (provided by {@link #events()} method). By default do nothing and can be overridden to implement any
* parse logic
* Don't call it directly, use {@link #processEvent(GHSubscriberEvent)} static function
*
Expand All @@ -130,7 +130,7 @@ protected void onEvent(GHEvent event, String payload) {

/**
* This method called when root action receives webhook from GH and this extension is interested in such
* events (provided by {@link #events()} method). By default do nothing and can be overrided to implement any
* events (provided by {@link #events()} method). By default do nothing and can be overridden to implement any
* parse logic
* Don't call it directly, use {@link #processEvent(GHSubscriberEvent)} static function
*
Expand Down
@@ -1,2 +1,2 @@
If jenkins will receive PUSH GitHub hook from repo defined in Git SCM section it
If Jenkins will receive PUSH GitHub hook from repo defined in Git SCM section it
will trigger Git SCM polling logic. So polling logic in fact belongs to Git SCM.
@@ -1,8 +1,8 @@
<div>
<p>
This value will be used as context name for
<a href="https://developer.github.com/v3/repos/statuses/">commit status</a> if status builder or
status publisher is defined for this project. It should be small and clear.
<a href="https://developer.github.com/v3/repos/statuses/">commit status</a> if status builder or
status publisher is defined for this project. It should be small and clear.
</p>

<p>
Expand Down
Expand Up @@ -2,7 +2,7 @@
<p>
Enter the URL for the GitHub hosted project (without the tree/master or tree/branch part).
</p>

<p>
For example:
<code>https://github.com/rails/rails</code> for the Rails project.
Expand Down
@@ -1,4 +1,4 @@
<div>
Message content that will be expanded using core variable expansion i.e. <b>${WORKSPACE}</b><br>
Message content that will be expanded using core variable expansion i.e. <tt>${WORKSPACE}</tt><br>
and <a href="https://wiki.jenkins-ci.org/display/JENKINS/Token+Macro+Plugin">Token Macro Plugin</a> tokens.<br>
</div>
@@ -1,4 +1,4 @@
<div>
Additional actions can help you with some routines. For example, you can convert your existing login + password
Additional actions can help you with some routines. For example, you can convert your existing login + password
(stored in credentials or directly) to a GitHub personal token.
</div>
Expand Up @@ -6,14 +6,14 @@

<p>
This plugin doesn't do anything with the GitHub API unless you add a configuration with credentials.
So if you don't want to add any configuration, you can setup hooks for this Jenkins instance manually.
So if you don't want to add any configuration, you can set up hooks for this Jenkins instance manually.
<br/>
In this mode, in addition to configuring projects with "<i>Build when a change is pushed to GitHub</i>",
you need to ensure that Jenkins gets a POST to its
<tt><a href="${rootURL}/github-webhook/">${app.rootUrl}github-webhook/</a></tt>.
</p>

<h3>If you setup credentials</h3>
<h3>If you set up credentials</h3>
<p>
In this mode, Jenkins will add/remove hook URLs to GitHub based on the project configuration.
Jenkins has a single post-commit hook URL for all the repositories, and this URL will be added
Expand Down
Expand Up @@ -4,9 +4,9 @@
in <tt>$JENKINS_HOME</tt> to cache data retrieved from GitHub API calls.
A cache will help improve the performance by avoiding unnecessary data transfer, and by doing so it also
makes it less likely to hit <a href="https://developer.github.com/v3/#rate-limiting">API rate limit</a>
(by the use of <a href="https://developer.github.com/v3/#conditional-requests">conditional GET</a> calls.)
(by the use of <a href="https://developer.github.com/v3/#conditional-requests">conditional GET</a> calls).
</p>
<p>
In an unlikely event that cache is causing a problem, set this to <b>0</b> to disable cache altogether.
In the unlikely event that cache is causing a problem, set this to <tt>0</tt> to disable cache altogether.
</p>
</div>
Expand Up @@ -9,15 +9,15 @@
</ul>

<br/>
In Jenkins create credentials as «Secret Text», provided by
<a href="https://wiki.jenkins-ci.org/display/JENKINS/Plain+Credentials+Plugin">Plain Credentials Plugin</a><br/>
In Jenkins, create credentials as «Secret Text», provided by
<a href="https://wiki.jenkins-ci.org/display/JENKINS/Plain+Credentials+Plugin">Plain Credentials Plugin</a>.<br/>

<p>
<b>WARNING!</b> Credentials are filtered on changing custom GitHub URL<br/>
<b>WARNING!</b> Credentials are filtered on changing custom GitHub URL.<br/>
</p>

<p>
If you have an existing GitHub login and password you can convert it to a token automatically with the help of «<b>Manage
additional GitHub actions</b>»
additional GitHub actions</b>».
</p>
</div>
@@ -1,4 +1,4 @@
<div>
Will this configuration will be used to manage credentials for repositories where it has admin rights?
Will this configuration be used to manage credentials for repositories where it has admin rights?
If unchecked, this credentials still can be used to manipulate commit statuses, but will be ignored to manage hooks.
</div>
@@ -1,5 +1,5 @@
<div>
Pair of GitHub token and server URL. If no any custom URL is specified, then the default <code>api.github.com</code> will be used.
Pair of GitHub token and server URL. If no custom URL is specified, then the default <code>api.github.com</code> will be used.
If your Jenkins uses multiple repositories that are spread across different
user accounts, you can list them all here as separate configurations.
</div>
Expand Up @@ -4,5 +4,5 @@

This helper doesn't store any entered data, but only registers a new token with all scopes needed to plugin.<br/>
After token registration, it will be stored as «Secret text» credentials with domain requirements corresponding to
given API URL. It will be available after refreshing the Global Confiration page.
given API URL. It will be available after refreshing the Global Confirmation page.
</div>
@@ -1,3 +1,3 @@
<div>
Using GitHub status api sets status of the commit
</div>
Using GitHub status api sets status of the commit.
</div>
@@ -1,3 +1,3 @@
<div>
Any repository provided by the programmatic contributors list
</div>
Any repository provided by the programmatic contributors list.
</div>
@@ -1,3 +1,3 @@
<div>
Uses data-action (located at ${build.url}/git/) to determine actual SHA
</div>
Uses data-action (located at <tt>${build.url}/git/</tt>) to determine actual SHA.
</div>
@@ -1,3 +1,3 @@
<div>
Points commit status backref back to the producing build page.
Points commit status backref back to the producing build page.
</div>
@@ -1,4 +1,4 @@
<div>
You can define in which cases you want to publish exact state and message for the commit. You can define multiply cases.
You can define in which cases you want to publish exact state and message for the commit. You can define multiple cases.
First match (starting from top) wins. If no one matches, <i>PENDING</i> status + warn message will be used.
</div>
</div>
@@ -1,3 +1,3 @@
<div>
Uses display name property defined in "Github project property" with fallback to job name.
</div>
Uses display name property defined in "GitHub project property" with fallback to job name.
</div>
@@ -1,3 +1,3 @@
<div>
Writes simple message about build result and duration
</div>
Writes simple message about build result and duration.
</div>
@@ -1,3 +1,3 @@
<div>
Allows env vars and token macro
</div>
Allows env vars and token macros.
</div>
@@ -1,3 +1,3 @@
<div>
You can define context name manually
</div>
You can define context name manually.
</div>
@@ -1,3 +1,3 @@
<div>
Allows env vars and token macro
</div>
Allows env vars and token macro.
</div>
@@ -1,3 +1,3 @@
<div>
Allows to define commit sha manually
</div>
Allows to define commit SHA manually.
</div>
@@ -1,3 +1,3 @@
<div>
Allows env vars and token macro
</div>
Allows env vars and token macro.
</div>
Expand Up @@ -22,13 +22,13 @@ public void shouldNotManageHooksOnEmptyCreds() throws Exception {
}

@Test
public void shouldManageHooksOnMangedConfig() throws Exception {
public void shouldManageHooksOnManagedConfig() throws Exception {
GitHubPlugin.configuration().getConfigs().add(new GitHubServerConfig(""));
assertThat(GitHubPlugin.configuration().isManageHooks(), is(true));
}

@Test
public void shouldNotManageHooksOnNotMangedConfig() throws Exception {
public void shouldNotManageHooksOnNotManagedConfig() throws Exception {
GitHubServerConfig conf = new GitHubServerConfig("");
conf.setManageHooks(false);
GitHubPlugin.configuration().getConfigs().add(conf);
Expand Down

0 comments on commit daa9aa5

Please sign in to comment.