Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only trigger deploy blocker notifications on issues #4707

Merged
merged 3 commits into from
Aug 28, 2021

Conversation

AndrewGable
Copy link
Contributor

Details

We were triggering the deploy blocker notifications on PRs which could include forks, which was causing issues here: https://github.com/Expensify/App/actions/runs/1140938643

Tests

  1. Merge this PR
  2. Add a DeployBlockerCash label to a PR, verify it does not ping in Slack
  3. Add a DeployBlockerCash label to a issue, verify it does ping in Slack

@AndrewGable AndrewGable self-assigned this Aug 17, 2021
@AndrewGable AndrewGable requested a review from a team as a code owner August 17, 2021 23:11
@MelvinBot MelvinBot requested review from aldo-expensify and removed request for a team August 17, 2021 23:12
@aldo-expensify
Copy link
Contributor

aldo-expensify commented Aug 18, 2021

nab: If I'm understanding correctly, we are not listening anymore to events related to pull request, maybe we should comment or remove the lines handling these events:

- name: Get URL, title, & number of new deploy blocker (pull request)
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "DEPLOY_BLOCKER_URL=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV
echo "DEPLOY_BLOCKER_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
echo "DEPLOY_BLOCKER_TITLE=$(sed -e "s/'/'\\\\''/g; s/\`/\\\\\`/g; 1s/^/'/; \$s/\$/'/" <<< "'${{ github.event.pull_request.title }}'")" >> $GITHUB_ENV

The may confuse another developer into thinking that this is still processing pull requests.

Besides that, I don't know how to test this safely. The modified lines make sense to me, but I guess this should be also reviewed by someone else :)

@AndrewGable
Copy link
Contributor Author

Nice find @aldo-expensify! The linked code is actually dead and I will update to remove it.

@roryabraham
Copy link
Contributor

@AndrewGable I'll hold off on reviewing until you've removed the dead code. Just ping me when it's ready!

@AndrewGable
Copy link
Contributor Author

Updated

Copy link
Contributor

@aldo-expensify aldo-expensify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me!

@roryabraham roryabraham merged commit 70f8208 into main Aug 28, 2021
@roryabraham roryabraham deleted the andrew-deploy-blocker-fix branch August 28, 2021 00:16
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @roryabraham in version: 1.0.88-3 🚀

platform result
🤖 android 🤖 cancelled 🔪
🖥 desktop 🖥 cancelled 🔪
🍎 iOS 🍎 cancelled 🔪
🕸 web 🕸 success ✅

@roryabraham
Copy link
Contributor

Going to use this PR and the linked issue to test this.

@roryabraham roryabraham added the DeployBlockerCash This issue or pull request should block deployment label Aug 30, 2021
@roryabraham
Copy link
Contributor

Yep, that didn't do anything, which is what we want. We could maybe remove the label and leave a comment to explain that only issues (not pull requests) can be deploy blockers. But we don't have to – that's a nice-to-have. What do y'all think?

@roryabraham roryabraham removed the DeployBlockerCash This issue or pull request should block deployment label Aug 31, 2021
@roryabraham
Copy link
Contributor

This worked for issues: https://expensify.slack.com/archives/C01GTK53T8Q/p1630438694222000

So this is a QA-pass 🎉

@OSBotify
Copy link
Contributor

OSBotify commented Sep 1, 2021

🚀 Deployed to production by @roryabraham in version: 1.0.90-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants