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
21 changes: 17 additions & 4 deletions .github/workflows/authors-and-third-party-notices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ permissions:

jobs:
update_generated_files:
if: |
github.event_name == "schedule" ||
!startsWith(github.event.head_commit.message, "chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary")
name: Update automatically generated files
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -69,7 +72,17 @@ jobs:
npm run update-tracking-plan
git add docs/tracking-plan.md

# - name: Commit and push
# run: |
# git commit --no-allow-empty -m "chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary" || true
# git push
- name: Commit and push
run: |
# We can't rely on git not allowing empty commits by default: the
# empty commit check happens before the pre-commit hooks run and if
# there is no diff exists after precommit logic was executed, empty
# commit will still be generated. Instead of that we will allow empty
# commit to happen and will check it directly if it's empty or not
git commit --allow-empty -m "chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary"
if [ $(git diff-tree --name-only --no-commit-id HEAD | wc -l) -gt 0 ]; then
echo "Files changed, pushing update..."
git push
else
echo "No changes to push"
fi
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
"update-authors": "node scripts/generate-authors.js",
"preupdate-third-party-notices": "npm run -w packages/compass compile",
"update-third-party-notices": "cp packages/compass/THIRD-PARTY-NOTICES.md .",
"postupdate-third-party-notices": "npx prettier-compass THIRD-PARTY-NOTICES.md --write",
"update-tracking-plan": "npx ts-node scripts/generate-tracking-plan.ts > docs/tracking-plan.md",
"postupdate-tracking-plan": "npx prettier-compass docs/tracking-plan.md --write",
"bump-packages": "bump-monorepo-packages",
"publish-packages": "lerna publish from-package --no-verify-access --no-push --no-git-tag-version --yes",
"version": "node ./scripts/align-monorepo-dependencies.js --no-commit",
Expand All @@ -50,6 +52,7 @@
"update-evergreen-config": "node .evergreen/template-yml.js",
"postupdate-evergreen-config": "evergreen validate .evergreen.yml",
"update-security-test-summary": "ts-node scripts/generate-security-test-summary.ts > docs/security-test-summary.md",
"postupdate-security-test-summary": "npx prettier-compass docs/security-test-summary.md --write",
"prepare": "husky install",
"snyk-test": "node scripts/snyk-test.js",
"pregenerate-vulnerability-report": "npm run compile -w packages/compass && npm run snyk-test",
Expand Down
Loading