question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[GH Actions] Create the markPullRequestsAsDeployed action

See original GitHub issue

If you haven’t already, check out our contributing guidelines for onboarding!


Problem

There is no obvious audit trail on Expensify.cash pull requests that show us whether they’ve been deployed.

Why is this important?

Right now, this isn’t a super critical issue because PRs are always deployed when they’re merged. But soon, that won’t be the case. Furthermore, right now we’re only deploying once, directly to production, but soon we’ll be deploying pull requests first to staging, then to production.

Solution

Create a Github Action called markPullRequestsAsDeployed that takes the following inputs:

  1. PR_LIST: Array<Number> – The list of PR #’s to comment in
  2. IS_PRODUCTION_DEPLOY: Boolean

And it will use octokit.issues.createComment to comment on every PR in the list stating that it was deployed to staging or production.

To be considered complete

  • You must provide documentation that this has been tested in a separate repo (or a fork of Expensify.cash) as is working as expected.
  • Just because the PR is merged doesn’t mean that your work is done. We need to make sure that it’s working as expected with a live test in Expensify.cash.

Internal issue Upwork posting

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
roryabrahamcommented, Mar 2, 2021

@mikeattara Your proposal looks good. I’d like to see automated unit tests of the comments, too.

1reaction
mikeattaracommented, Mar 2, 2021

My proposed solution:

  • Loop over the PR_LIST
  • Check if each PR is merged to the master or staging branch based on the IS_PRODUCTION_DEPLOY value
  • Write a comment on the PR stating whether the PR has been deployed on production or staging

NB: I applied on Upwork

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create Pull Request · Actions · GitHub Marketplace
A GitHub action to create a pull request for changes to your repository in the actions workspace. Changes to a repository in the...
Read more >
Deploy your pull requests with GitHub Actions ... - Sander Knape
Performing (automated) tests on pull requests is a powerful mechanism to reduce the feedback loop on code changes. Known as shift left, ...
Read more >
Automate Chromatic with GitHub Actions • Chromatic docs
Chromatic provides a GitHub Action to help you automate your visual regression ... Or you could disable Chromatic on pull requests from forked...
Read more >
Trigger an Azure Pipelines run from GitHub Actions
Start an Azure DevOps pipeline run from within a GitHub action. ... place where you store code and collaborate on pull requests and...
Read more >
Setting up CI/CD with Github Actions - Vonage Developer
Create a Pull Request for this change; The CI kicks in and runs the following: Lint, Test, Build; Once the CI finishes, it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found