Skip to content

Commit 34b0150

Browse files
Apply updates from cookiecutter
This automated commit applies the latest updates from our cookiecutters [1] to this repo. [1]: https://github.com/hypothesis/cookiecutters
1 parent 9f2df3c commit 34b0150

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

.github/workflows/slack.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ on:
66
branches: [main]
77
jobs:
88
on-failure:
9-
runs-on: ubuntu-latest
109
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
11-
steps:
12-
- name: Post to Slack
13-
uses: slackapi/[email protected]
14-
with:
15-
channel-id: 'C4K6M7P5E'
16-
slack-message: "A workflow run failed\n*Repo:* `${{ github.event.repository.full_name }}` (${{ github.event.repository.html_url }})\n*Workflow:* ${{ github.event.workflow.name }} (${{ github.event.workflow.html_url }})\n*Branch:* `${{ github.event.workflow_run.head_branch }}`\n*Commit:* `${{ github.event.workflow_run.head_commit.id }}`\n*Run:* ${{ github.event.workflow_run.html_url }}\n*Conclusion:* ${{ github.event.workflow_run.conclusion }}"
17-
env:
18-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
10+
name: Post to Slack
11+
uses: hypothesis/workflows/.github/workflows/slack.yml@main
12+
with:
13+
payload: |
14+
channel: "C4K6M7P5E"
15+
markdown_text: "Failed `${{ github.event.workflow_run.path }}` run (attempt ${{ github.event.workflow_run.run_attempt }}) on `${{ github.event.workflow_run.head_branch }}` in `${{ github.event.workflow_run.repository.full_name }}`: ${{ github.event.workflow_run.html_url }}"
16+
secrets: inherit

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ $(call help,make help,print this help message)
88
$(call help,make services,start the services that the app needs)
99
services: args?=up -d --wait
1010
services: python
11-
@docker network create dbs 2>/dev/null || true
1211
@docker compose $(args)
1312

1413
.PHONY: db

h/_version.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
def fetch_git_ref():
16-
return subprocess.check_output( # noqa: S603
16+
return subprocess.check_output(
1717
["git", "rev-parse", "--short", "HEAD"], # noqa: S607
1818
stderr=DEVNULL,
1919
).strip()
@@ -27,10 +27,10 @@ def fetch_git_date(ref):
2727
def fetch_git_dirty():
2828
# Ensure git index is up-to-date first. This usually isn't necessary, but
2929
# can be needed inside a docker container where the index is out of date.
30-
subprocess.call(["git", "update-index", "-q", "--refresh"]) # noqa: S603, S607
31-
dirty_tree = bool(subprocess.call(["git", "diff-files", "--quiet"])) # noqa: S603, S607
30+
subprocess.call(["git", "update-index", "-q", "--refresh"]) # noqa: S607
31+
dirty_tree = bool(subprocess.call(["git", "diff-files", "--quiet"])) # noqa: S607
3232
dirty_index = bool(
33-
subprocess.call(["git", "diff-index", "--quiet", "--cached", "HEAD"]) # noqa: S603, S607
33+
subprocess.call(["git", "diff-index", "--quiet", "--cached", "HEAD"]) # noqa: S607
3434
)
3535
return dirty_tree or dirty_index
3636

0 commit comments

Comments
 (0)