Commit 10d461bb authored by Jon's avatar Jon
Browse files

Merge branch '8-error-label-exists-when-using-scoped-labels' into 'development'

Resolve "Error - Label exists (only one page of results returned)"

See merge request !7
parents ff99a559 f1ea4666
Loading
Loading
Loading
Loading
Loading
+14 −0
Changes for CONTRIBUTING.md: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -41,6 +41,11 @@ Clean-up the environment
rm -Rf build bin docs/_build gitlab_management.egg-info lib include pyvenv.cfg
```

to build the module
``` bash
python3 setup.py sdist bdist_wheel
```

>**Note:** you must increment the version in the build script (`buildinit.py`) prior to committing your final changes to the repo.

### Version Changes
@@ -100,6 +105,9 @@ Don't add an Attributes section to a class.

See Also
--------
`Dependent Methods`
    List methods alphabetically here one per line and as a hyperlink to the method.
    `Output <#gitlab_management.base.GitlabManagement.Output>`_

"""
```
@@ -143,6 +151,12 @@ Returns
bool
    True if successful, False otherwise.

See Also
--------
`Dependent Methods`
    List methods alphabetically here one per line and as a hyperlink to the method.
    `Output <#gitlab_management.base.GitlabManagement.Output>`_

"""
```

+1 −1
Changes for buildinit.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ __license__ = "GNU LGPLv3"
__copyright__ = "(C) All Rights reserved"
__source__ = ''
__title__ = "gitlab-management"
__version__ = "0.1.3"
__version__ = "0.1.4"
__doc__ = "https://gitlab.com/nofusscomputing/projects/python-gitlab-management"

CurrentDirectory = './'
+26 −0
Changes for docs/pages/configuration.md: 26 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Configuration
The configuration file for gitlab-management is called `config.yml`. 


## Config.yml
the config file type is yaml. for `gitlab-management` to process, it must be valid yaml.


*Example config file layout*
``` yaml
Group:
    Labels:
        -
            Group: "ExampleGroup1"
            Name: "Stage::Planning"
            Description: "example description for the label"
            Color: "#FF0000"

        -
            Group: 
                - "ExampleGroup1"
                - "ExampleGroup2"
            Name: "Stage::RequireFeedback"
            Description: "example description for the label"
            Color: "#FF0000"
```
+1 −0
Changes for docs/pages/docker.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ The module has been built into a docker container that can be found on docker hu
## Building
**To Build, execute the following:**
``` bash
python3 setup.py sdist bdist_wheel
docker build . --no-cache -t nofusscomputing/gitlab-management:$(cat dist/version)-alpine
```

docs/pages/labels.md

0 → 100644
+46 −0
Changes for docs/pages/labels.md: 46 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Labels

Labels can be managed via gitlab-management python module.


Within the config file [config.yml](configuration.html#Config.yml), the labels are an array (`dict` in python) under path `Group.Labels`. The layout file must be a valid yaml.

>**Tip:** *Labels are cached to keep GitLab API queries as low as possible. A groups labels will only be requested from the GitLab API, `once!!`*

*Example config file layout for labels*
``` yaml
Group:
    Labels:
        -
            Group: "ExampleGroup1"
            Name: "Stage::Planning"
            Description: "example description for the label"
            Color: "#FF0000"

        -
            Group: 
                - "ExampleGroup1"
                - "ExampleGroup2"
            Name: "Stage::RequireFeedback"
            Description: "example description for the label"
            Color: "#FF0000"
```

### Keys

* **Group.Labels.#.Group**: can be a `string` for a single group or `array` of string if you wan't more than one group to have the label.   
* **Group.Labels.#.Name**: The name that you want the label to be.  
* **Group.Labels.#.Description**: The description you want attached to the label.  
* **Group.Labels.#.Color**: a hex representation of the color. in html color notation.  


In the above example, `ExampleGroup1` would get both labels (`Stage::Planning` and `Stage::RequireFeedback`), whereas `ExampleGroup2` will only get label `Stage::RequireFeedback`


### See Also
 - [gitlab-management.ProcessConfigLabels() method](../module/gitlab_management.base.html#gitlab_management.base.GitlabManagement.ProcessConfigLabels)

 - [gitlab-management.GetLabelByName() method](../module/gitlab_management.base.html#gitlab_management.base.GitlabManagement.GetLabelByName)

 - [**Feature** - Labels now cached (issue #8)](https://gitlab.com/nofusscomputing/projects/python-gitlab-management/-/issues/8)
Loading