Add git submodule change notification bot #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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](https://github.com/DataDog/dd-trace-java/blob/master/CONTRIBUTING.md#git-submodule-setup).' | |
}) |