Skip to content

Commit

Permalink
Merge pull request #4 from Expensify/master
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
tugbadogan authored Mar 20, 2021
2 parents acc4a79 + 9a06b68 commit c5bee66
Show file tree
Hide file tree
Showing 77 changed files with 6,758 additions and 291 deletions.
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
EXPENSIFY_URL_COM=https://www.expensify.com.dev/
EXPENSIFY_URL_CASH=https://expensify.cash/
EXPENSIFY_PARTNER_NAME=android
EXPENSIFY_PARTNER_PASSWORD=c3a9ac418ea3f152aae2
EXPENSIFY_URL_COM=https://www.expensify.com.dev/
EXPENSIFY_PARTNER_NAME=chat-expensify-com
EXPENSIFY_PARTNER_PASSWORD=e21965746fd75f82bb66
PUSHER_APP_KEY=ac6d22b891daae55283a
NGROK_URL=https://expensify-user.ngrok.io/
USE_NGROK=false
Expand Down
13 changes: 13 additions & 0 deletions .github/actions/createOrUpdateStagingDeploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,19 @@ class GithubUtils {
});
}

/**
* Generate the well-formatted body of a production release.
*
* @param {Array} pullRequests
* @returns {String}
*/
static getReleaseBody(pullRequests) {
return _.map(
pullRequests,
number => `- ${this.getPullRequestURLFromNumber(number)}`,
).join('\r\n');
}

/**
* Generate the URL of an Expensify.cash pull request given the PR number.
*
Expand Down
12 changes: 12 additions & 0 deletions .github/actions/getReleaseBody/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Get Release Body'
description: 'Generate the body of a production release'
inputs:
PR_LIST:
description: JSON array of pull request numbers (string)
required: true
outputs:
RELEASE_BODY:
description: String body of a production release.
runs:
using: 'node12'
main: './index.js'
12 changes: 12 additions & 0 deletions .github/actions/getReleaseBody/getReleaseBody.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const _ = require('underscore');
const core = require('@actions/core');
const GithubUtils = require('../../libs/GithubUtils');

// Parse the stringified JSON array of PR numbers, and cast each from String -> Number
const PRList = _.map(JSON.parse(core.getInput('PR_LIST', {required: true})), Number);
console.log(`Got PR list: ${PRList}`);

const releaseBody = GithubUtils.getReleaseBody(PRList);
console.log(`Generated release body: ${releaseBody}`);

core.setOutput('RELEASE_BODY', releaseBody);
Loading

0 comments on commit c5bee66

Please sign in to comment.