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 getPullRequestsMergedBetween function

See original GitHub issue

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


Problem

As part of our new Expensify.cash Deploy & QA process, we need a way to be able to figure out the set of PRs that moved the application from some older version to some newer version.

Why is this important?

This operation has myriad usages in the Deploy & QA process. One such use is to gather the PRs that have been deployed to staging since the previously QA’d version, so that Applause can QA all those PRs.

Solution

Create a Javascript function in expensify-common called getPullRequestsMergedBetween that will take in two git refs, and will gather a list of PR numbers of all PRs merged between those two refs by:

  1. Executing the following shell command to list all commit messages between the two refs:

    git log --format="%s" ${FROM_REF}...${TO_REF}

  2. Apply this regex to parse the PR numbers of merged PRs from the results:

    /Merge pull request #(\d{1,6})/g

  3. Return the resulting list of PR numbers.

To be considered complete

  • Document manual testing done
  • Provide automated unit tests for this function

Internal issue Upwork listing

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
tugbadogancommented, Mar 1, 2021

Hi @arielgreen

I would like to work on this issue. Here is my proposal:

A question for you, in which context are we going to call this function? Are we going to get the repository folder as a parameter or are we going to have something like octokit client?

0reactions
roryabrahamcommented, Mar 10, 2021

@tugbadogan nothing else to do here, so I’ll close this issue. There’s a standard 7-day wait period between the time your PR is merged and when we pay out issues, to allow some time to see if your code introduces any unforeseen regressions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Merging a pull request - GitHub Docs
Merge all of the commits into the base branch by clicking Merge pull request. If the Merge pull request option is not shown,...
Read more >
Running GitHub Actions only on certain pull requests
Configure your workflow to be triggered when a pull request's label changes, and filter based on the label's presence.
Read more >
Github actions - on pull request merged with speciphic labels
pr merged to main branch AND pr contains label == 'site'. This is what I came up with, the problem that this one...
Read more >
GitHub Actions: How to Create Pull Requests Automatically
Create a pull request to merge the new branch into the base—the branch checked out in the workflow. There are many interesting use...
Read more >
Schedule GitHub Pull Request merges using Actions
There is currently no built-in feature to schedule a pull request merge on GitHub. But a little GitHub Action magic can fill in...
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