Skip to content

Commit

Permalink
Merge pull request #123 from wp-media/develop
Browse files Browse the repository at this point in the history
Release notes to be sent to ops-deploy
  • Loading branch information
MathieuLamiot authored Oct 23, 2024
2 parents 9731bb0 + 11b8ae8 commit 4fe60b7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-on_pr_main_bash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ jobs:
name: coverage-report-${{ github.run_id }}

- name: Install dependencies
run: pip install git+https://github.com/MathieuLamiot/diff_cover
run: pip install diff-cover

- name: Generate diff-coverage report
if: github.event_name == 'pull_request'
run: |
diff-cover coverage.xml --compare-branch=origin/${{ github.base_ref }} --markdown-report diff-cover-report.md --exclude test*.py --fail-under=50 --expand_coverage_report
diff-cover coverage.xml --compare-branch=origin/${{ github.base_ref }} --markdown-report diff-cover-report.md --exclude test*.py --fail-under=50 --expand-coverage-report
echo "DIFF_COVER_EXIT_STATUS=$?" >> $GITHUB_ENV
shell: bash

Expand Down
3 changes: 2 additions & 1 deletion config/slack.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"dev-team-escalation-channel": "C056ZJMHG0P",
"engineering-service-team-channel": "C069W48E47N",
"release-channel" : "C05PGTQHHJ9",
"ops-channel": "C88N0811V"
"ops-channel": "C88N0811V",
"ops-deploy-channel": "C07SXUKRSLE"
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ yarl==1.9.2
flask-slacksigauth==1.0.9
freezegun==1.2.2
pytest-cov==5.0.0
diff-cover==9.1.1
diff-cover==9.2.0
2 changes: 2 additions & 0 deletions sources/factories/SlackMessageFactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def get_channel(self, flow):
return self.slack_config["release-channel"]
if 'ops' == flow:
return self.slack_config["ops-channel"]
if 'ops-deploy' == flow:
return self.slack_config["ops-deploy-channel"]
raise ValueError('Unknown flow for get_channel.')

def get_release_note_review_blocks(self, text):
Expand Down
2 changes: 1 addition & 1 deletion sources/handlers/GithubReleaseHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ def process_release(self, app_context, release_params):
blocks = self.slack_message_factory.get_release_note_review_blocks(text)

self.slack_message_factory.post_message(app_context,
self.slack_message_factory.get_channel('ops'),
self.slack_message_factory.get_channel('ops-deploy'),
text, blocks)

0 comments on commit 4fe60b7

Please sign in to comment.