25691da17a
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
28 lines
983 B
YAML
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
|