airshipctl/playbooks/airship-airshipctl-update-github-issues.yaml
Ian H. Pittwood 25691da17a [#39] Add Zuul job for GitHub Issues integration
Adds a post job to update related issues in Github on change merges. If
a change contains a "Closes: #X" tag, issue X will be closed on merge.
If a change contains a "Relates-To: #X" or "[#X]" tag, a comment will be
made on the associated issue to indicate the change was merged and that
the issue may be closeable.

Closes: #39

Change-Id: Ide9a4d53de7be0e467422938e4e8067fb41ce036
2020-03-02 09:49:27 -06:00

28 lines
983 B
YAML

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- hosts: primary
tasks:
- name: Install script dependencies
pip:
name:
- PyGithub==1.46
executable: pip3
- name: Run python script
script: >
zuul.d/scripts/update_github_issues.py "{{ github_credentials.username }}" \
"{{ github_credentials.password }}" \
"{{ zuul.message }}" \
"{{ zuul.items[0].change_url }}"
args:
executable: python3