Skip to content

Commit 801c0c6

Browse files
committed
Update README (BLD-5704)
1 parent f86da64 commit 801c0c6

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.github/workflows/status_check.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
- uses: actions/setup-python@v2
1515
with:
1616
python-version: "3.7"
17-
- name: Set the commit message
17+
- name: Get the commit message
1818
run: |
19-
echo "commit_message=$(git log --format=%B -n 1 ${{ github.event.after }})" >> $GITHUB_ENV
20-
- uses: ccdc-opensource/commit-hooks@jira_bld_5704_jira_id_in_commit_message
19+
echo "commit_message=$(git log --format=%B -n 1 ${{ github.event.after }})" >> $GITHUB_ENV
20+
- uses: ccdc-opensource/commit-hooks@v3
2121
with:
2222
commitMessage: ${{ env.commit_message }}

README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ The commit will be flagged if it includes certain text files with:
1919

2020
## Usage
2121
```yaml
22-
- uses: ccdc-opensource/commit-hooks@v1
22+
- uses: ccdc-opensource/commit-hooks@v3
23+
with:
24+
commitMessage: 'The commit message'
2325
```
2426
2527
## Scenarios
@@ -40,7 +42,12 @@ jobs:
4042
- uses: actions/setup-python@v2
4143
with:
4244
python-version: "3.7"
43-
- uses: ccdc-opensource/commit-hooks@v2
45+
- name: Get the commit message
46+
run: |
47+
echo "commit_message=$(git log --format=%B -n 1 ${{ github.event.after }})" >> $GITHUB_ENV
48+
- uses: ccdc-opensource/commit-hooks@v3
49+
with:
50+
commitMessage: ${{ env.commit_message }}
4451
```
4552
4653
# commit-hooks

main.py

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515

1616
if __name__ == '__main__':
1717

18-
for key in sorted(os.environ.keys()):
19-
print(f'{key}: {os.environ[key]}')
20-
2118
message = os.getenv('INPUT_COMMITMESSAGE')
2219
print(f'Commit message: {message}')
2320

0 commit comments

Comments
 (0)