Skip to content

Add git submodule change notification bot #1

Add git submodule change notification bot

Add git submodule change notification bot #1

name: Comment on Submodule Update
on:
pull_request:
branches:
- 'master'
- 'release/**'
paths:
- 'dd-java-agent/agent-jmxfetch/integrations-core'
jobs:
comment_on_submodule_update:
runs-on: ubuntu-latest
steps:
- name: Post comment on submodule update
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # 6.3.3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Hi! 👋 Looks like you updated a Git Submodule.\n' +
'It is okay to do it on purpose, but if it is not, please make sure:\n\n' +
'* to update the submodule to the latest commit on the master branch using the `git submodule update` command,\n' +
'* to [check your setup for contributing](CONTRIBUTING.md#git-submodule-setup).'
})