Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/CODEOWNERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Code Owners

- [@natalialuzuriaga](https://github.com/natalialuzuriaga)
- [@decause-gov](https://github.com/decause-gov)
- [@sachin-panayil](https://github.com/sachin-panayil)
- [@DinneK](https://github.com/DinneK)

## Repo Domains

/docs @natalialuzuriaga @decause-gov @sachin-panayil
/schema/ @natalialuzuriaga @decause-gov
52 changes: 0 additions & 52 deletions .github/codejson/cookiecutter.json

This file was deleted.

132 changes: 0 additions & 132 deletions .github/codejson/hooks/post_gen_project.py

This file was deleted.

44 changes: 0 additions & 44 deletions .github/codejson/{{cookiecutter.project_name}}/code.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/auto-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ on:
release:
types:
- created
permissions:
contents: write
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: "Auto Generate changelog"
uses: heinrichreimer/action-github-changelog-generator@v2.3
with:

token: ${{ secrets.GITHUB_TOKEN }}

91 changes: 42 additions & 49 deletions .github/workflows/contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Update Contributors Information

on:
workflow_dispatch: {}
schedule:
# Weekly on Saturdays.
- cron: "30 1 * * 6"
push:
branches: [main]

Expand All @@ -19,60 +16,56 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 0

- name: Update contributor list
id: contrib_list
uses: akhilmhdh/contributors-readme-action@v2.3.10
- name: Check if update needed
id: check_changes
env:

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

with:
readme_path: MAINTAINERS.md
use_username: false
commit_message: "update contributors information"

- name: Get contributors count
id: get_contributors
env:

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


run: |
OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1)
REPO=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2)
QUERY='query { repository(owner: \"'"$OWNER"'\", name: \"'"$REPO"'\") { collaborators { totalCount } } }'
CONTRIBUTORS=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/$OWNER/$REPO/contributors?per_page=100" | \
jq '[.[] | select(.type != "Bot" and (.login | test("\\[bot\\]$") | not) and (.login | test("-bot$") | not))] | length')
echo "Total contributors: $CONTRIBUTORS"
echo "contributors=$CONTRIBUTORS" >> $GITHUB_OUTPUT
OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1)
REPO=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2)
CURRENT=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/$OWNER/$REPO/contributors?per_page=100" | \
jq -r '[.[] | select(.type != "Bot" and (.login | test("\\[bot\\]$") | not) and (.login | test("-bot$") | not)) | .login] | sort | join(",")')
- name: Update MAINTAINERS.md
run: |
CONTRIBUTORS="${{ steps.get_contributors.outputs.contributors }}"
EXISTING=$(grep -oP '(?<=github.com/)[^"]+(?=">)' COMMUNITY.md | \
grep -v "^$" | sort | uniq | tr '\n' ',' | sed 's/,$//')
perl -i -pe 's/(<!--CONTRIBUTOR COUNT START-->).*?(<!--CONTRIBUTOR COUNT END-->)/$1 '"$CONTRIBUTORS"' $2/' MAINTAINERS.md
echo "Current contributors: $CURRENT"
echo "Existing contributors: $EXISTING"
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add MAINTAINERS.md
git commit -m "update contributors count to $CONTRIBUTORS" || exit 0
if [ "$CURRENT" = "$EXISTING" ]; then
echo "has_changes=false" >> $GITHUB_OUTPUT
echo "No new contributors found. Skipping update!"
else
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "New contributors detected. Running update!"
fi
- name: Push protected
uses: CasperWA/push-protected@v2
- name: Update contributor list
if: steps.check_changes.outputs.has_changes == 'true'
id: update_contributors
uses: akhilmhdh/contributors-readme-action@v2.3.10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:

token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }}

readme_path: COMMUNITY.md
commit_message: "updating contributors list"
pr_title_on_protected: "docs: update contributors information"
committer_username: "github-actions[bot]"
committer_email: "github-actions[bot]@users.noreply.github.com"

- name: Update PR
if: steps.check_changes.outputs.has_changes == 'true' && steps.update_contributors.outputs.pr_id != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_NUMBER="${{ steps.update_contributors.outputs.pr_id }}"
branch: main
gh pr edit $PR_NUMBER \
--body "New contributors detected! This PR updates the contributors list in COMMUNITY.md." \
--add-label "documentation"
11 changes: 6 additions & 5 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: Check for Secrets
on:
pull_request:
push:

pull_request:
push:
permissions:
contents: read
jobs:
scan-for-secrets:
name: Run gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: {fetch-depth: 0}
with: { fetch-depth: 0 }

- name: Check for GitLeaks
uses: gacts/gitleaks@v1
uses: gacts/gitleaks@v1
Loading
Loading