Skip to content

Commit

Permalink
fix(update-codeowners-from-packages): add manual CODEOWNERS after pac…
Browse files Browse the repository at this point in the history
…kage CODEOWNERS (#288)

* fix(update-codeowners-from-packages): add manual CODEOWNERS after package CODEOWNERS

Signed-off-by: Ryohsuke Mitsudome <[email protected]>

* fix: add empty line after package owners list

Signed-off-by: Ryohsuke Mitsudome <[email protected]>

---------

Signed-off-by: Ryohsuke Mitsudome <[email protected]>
  • Loading branch information
mitsudome-r authored Mar 1, 2024
1 parent 6722873 commit d206ce6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions update-codeowners-from-packages/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,8 @@ runs:

- name: Update CODEOWNERS
run: |
# Initialize CODEOWNERS
echo "### Copied from ${{ inputs.codeowners-manual }} ###" >.github/CODEOWNERS
touch ${{ inputs.codeowners-manual }}
cat ${{ inputs.codeowners-manual }} >> .github/CODEOWNERS
echo "" >>.github/CODEOWNERS
# List package maintainers
echo "### Automatically generated from package.xml ###" >>.github/CODEOWNERS
# Initialize CODEOWNERS with package maintainers
echo "### Automatically generated from package.xml ###" >.github/CODEOWNERS
for package_xml in $(find . -name package.xml | sed "s|^./||" | sort); do
package_dir=$(dirname "$package_xml")
line="$package_dir/**"
Expand All @@ -80,6 +74,13 @@ runs:
echo "$line" >>.github/CODEOWNERS
done
echo "" >>.github/CODEOWNERS
# Add manually defined CODEOWNERS
echo "### Copied from ${{ inputs.codeowners-manual }} ###" >>.github/CODEOWNERS
touch ${{ inputs.codeowners-manual }}
cat ${{ inputs.codeowners-manual }} >> .github/CODEOWNERS
shell: bash

- name: Create PR
Expand Down

0 comments on commit d206ce6

Please sign in to comment.