Skip to content

Commit 3f7fb5e

Browse files
authored
linting: modify yaml files to satisfy yamllint (#38144)
* linting: modify yaml files to satisfy yamllint The files modified are: - .yamllint (document-start, truthy) - .github/**/*.y[a]ml (document-start, indentation, line-length, truthy) * change yaml style to follow GHA style
1 parent 6ddcc20 commit 3f7fb5e

7 files changed

+87
-65
lines changed

.github/dependabot.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
---
12
version: 2
23
updates:
3-
- package-ecosystem: "github-actions"
4-
directory: "/"
5-
schedule:
6-
interval: "weekly"
7-
# only notify on security updates and not version updates.
8-
open-pull-requests-limit: 0
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
# only notify on security updates and not version updates.
9+
open-pull-requests-limit: 0

.github/labeler-config.yaml

+22-21
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
1+
---
12
# Add 'noetic' label if any files in noetic/ folder are changed by a PR
23
noetic:
3-
- noetic/*
4+
- noetic/*
45

56
# Add 'humble' label if any files in humble/ folder are changed by a PR
67
humble:
7-
- humble/*
8+
- humble/*
89

910
# Add 'iron' label if any files in iron/ folder are changed by a PR
1011
iron:
11-
- iron/*
12+
- iron/*
1213

1314
# Add 'rolling' label if any files in rolling/ folder are changed by a PR
1415
rolling:
15-
- rolling/*
16+
- rolling/*
1617

1718
# Add 'rosdep' label if any files in rosdep/ folder are changed by a PR
1819
rosdep:
19-
- rosdep/*
20+
- rosdep/*
2021

2122
# Add 'end-of-life' label if any files are in folders for versions that are no longer supported
2223
end-of-life:
23-
# ROS 1
24-
- groovy/*
25-
- hydro/*
26-
- indigo/*
27-
- jade/*
28-
- kinetic/*
29-
- lunar/*
30-
- melodic/*
31-
# ROS 2
32-
- ardent/*
33-
- bouncy/*
34-
- crystal/*
35-
- dashing/*
36-
- eloquent/*
37-
- foxy/*
38-
- galactic/*
24+
# ROS 1
25+
- groovy/*
26+
- hydro/*
27+
- indigo/*
28+
- jade/*
29+
- kinetic/*
30+
- lunar/*
31+
- melodic/*
32+
# ROS 2
33+
- ardent/*
34+
- bouncy/*
35+
- crystal/*
36+
- dashing/*
37+
- eloquent/*
38+
- foxy/*
39+
- galactic/*

.github/mergify.yml

+26-22
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1+
---
12
pull_request_rules:
2-
- name: Comment on PRs with an end-of-life label
3-
conditions:
4-
- label=end-of-life
5-
actions:
6-
comment:
7-
message: This pull request changes files for a ROS distribution that is no longer supported (End Of Life) and the distribution will not have any future syncs to include this change.
8-
- name: Close on changes only to EOL folders
9-
conditions:
10-
- and:
11-
- label=end-of-life
12-
# Active ROS 1 distros
13-
- label!=melodic
14-
- label!=noetic
15-
# Active ROS 2 distros
16-
- label!=foxy
17-
- label!=galactic
18-
- label!=humble
19-
- label!=rolling
20-
# Other labels
21-
- label!=rosdep
22-
actions:
23-
close:
3+
- name: Comment on PRs with an end-of-life label
4+
conditions:
5+
- label=end-of-life
6+
actions:
7+
comment:
8+
message: >
9+
This pull request changes files for a ROS distribution
10+
that is no longer supported (End Of Life)
11+
and the distribution will not have any future syncs to include this change.
12+
- name: Close on changes only to EOL folders
13+
conditions:
14+
- and:
15+
- label=end-of-life
16+
# Active ROS 1 distros
17+
- label!=melodic
18+
- label!=noetic
19+
# Active ROS 2 distros
20+
- label!=foxy
21+
- label!=galactic
22+
- label!=humble
23+
- label!=rolling
24+
# Other labels
25+
- label!=rosdep
26+
actions:
27+
close:

.github/workflows/build_test.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
---
12
name: Validate rosdistro
2-
on:
3+
# this is fine since gha runs with yaml 1.2
4+
on: # yamllint disable-line rule:truthy
35
push:
46
branches: ['master']
57
pull_request:
@@ -22,7 +24,8 @@ jobs:
2224
python-version: ${{ matrix.python-version }}
2325
- name: Fetch upstream (to enable diff)
2426
run: |
25-
git remote add unittest_upstream_comparison https://github.com/ros/rosdistro.git || git remote set-url unittest_upstream_comparison https://github.com/ros/rosdistro.git
27+
git remote add unittest_upstream_comparison https://github.com/ros/rosdistro.git \
28+
|| git remote set-url unittest_upstream_comparison https://github.com/ros/rosdistro.git
2629
git fetch --no-tags --depth=1 unittest_upstream_comparison master
2730
- name: Install Dependencies
2831
run: |

.github/workflows/labeler.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
---
12
name: "Pull Request Labeler"
2-
on:
3+
# this is fine since gha runs with yaml 1.2
4+
on: # yamllint disable-line rule:truthy
35
- pull_request_target
46

57
permissions:

.github/workflows/stale_labeler.yaml

+21-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
1+
---
12
name: 'Label inactive PRs as stale'
23

3-
on:
4+
# this is fine since gha runs with yaml 1.2
5+
on: # yamllint disable-line rule:truthy
46
schedule:
5-
- cron: '0 11 * * *' # runs at 11am UTC every day => early morning in US
7+
- cron: '0 11 * * *' # runs at 11am UTC every day => early morning in US
68

79
jobs:
810
stale:
911
runs-on: ubuntu-latest
1012
steps:
11-
- uses: actions/stale@v8 # https://github.com/marketplace/actions/close-stale-issues
12-
with:
13-
stale-pr-label: 'stale'
14-
stale-pr-message: "This PR hasn't been activity in 14 days. If you are still are interested in getting it merged please provide an update. Otherwise it will likely be closed by a rosdistro maintainer following our [contributing policy](https://github.com/ros/rosdistro/blob/master/CONTRIBUTING.md). It's been labeled \"stale\" for visibility to the maintainers. If this label isn't appropriate, you can ask a maintainer to remove the label and add the 'persistent' label."
15-
days-before-pr-stale: 14
16-
days-before-pr-close: -1 # don't close PRs automatically
17-
days-before-issue-stale: -1 # don't label issues as stale
18-
days-before-issue-close: -1 # don't close issues automatically
19-
exempt-pr-labels: 'persistent'
13+
- uses: actions/stale@v8 # https://github.com/marketplace/actions/close-stale-issues
14+
with:
15+
stale-pr-label: 'stale'
16+
stale-pr-message: >
17+
This PR hasn't been activity in 14 days.
18+
If you are still are interested in getting it merged
19+
please provide an update.
20+
Otherwise it will likely be closed by a rosdistro maintainer
21+
following our [contributing policy](https://github.com/ros/rosdistro/blob/master/CONTRIBUTING.md).
22+
It's been labeled "stale" for visibility to the maintainers.
23+
If this label isn't appropriate,
24+
you can ask a maintainer to remove the label and add the 'persistent' label.
25+
days-before-pr-stale: 14
26+
days-before-pr-close: -1 # don't close PRs automatically
27+
days-before-issue-stale: -1 # don't label issues as stale
28+
days-before-issue-close: -1 # don't close issues automatically
29+
exempt-pr-labels: 'persistent'

.yamllint

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
extends:
23
default
34

@@ -8,10 +9,10 @@ rules:
89
rosdep/*.yaml
910
indentation:
1011
spaces: consistent
11-
indent-sequences: no
12+
indent-sequences: false
1213
key-duplicates: enable
1314
line-length:
1415
max: 125
15-
allow-non-breakable-words: yes
16+
allow-non-breakable-words: true
1617
ignore: |
1718
rosdep/*.yaml

0 commit comments

Comments
 (0)