Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/byte1012/App into fix-26941
Browse files Browse the repository at this point in the history
  • Loading branch information
byte1012 committed Dec 31, 2023
2 parents c6cd09c + 8cb48e4 commit c396220
Show file tree
Hide file tree
Showing 429 changed files with 58,558 additions and 40,955 deletions.
6 changes: 1 addition & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ const restrictedImportPaths = [
importNames: ['TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight'],
message: "Please use 'PressableWithFeedback' and/or 'PressableWithoutFeedback' from 'src/components/Pressable' instead.",
},
{
name: 'awesome-phonenumber',
importNames: ['parsePhoneNumber'],
message: "Please use '@libs/PhoneNumber' instead.",
},
{
name: 'react-native-safe-area-context',
importNames: ['useSafeAreaInsets', 'SafeAreaConsumer', 'SafeAreaInsetsContext'],
Expand Down Expand Up @@ -180,6 +175,7 @@ module.exports = {
'es/no-optional-chaining': 'off',
'valid-jsdoc': 'off',
'jsdoc/no-types': 'error',
'rulesdir/no-default-props': 'error',
'import/no-extraneous-dependencies': 'off',
'rulesdir/prefer-underscore-method': 'off',
'rulesdir/prefer-import-module-contents': 'off',
Expand Down
25 changes: 0 additions & 25 deletions .github/actions/composite/configureAwsCredentials/action.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/actions/javascript/authorChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/checkDeployBlockers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/createOrUpdateStagingDeploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/getPullRequestDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/getReleaseBody/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/isStagingDeployLocked/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/markPullRequestsAsDeployed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
67 changes: 56 additions & 11 deletions .github/actions/javascript/postTestBuildComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
/***/ 2052:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {

const _ = __nccwpck_require__(5067);
const core = __nccwpck_require__(2186);
const {context} = __nccwpck_require__(5438);
const CONST = __nccwpck_require__(4097);
const GithubUtils = __nccwpck_require__(7999);

/**
Expand Down Expand Up @@ -42,7 +44,12 @@ function getTestBuildMessage() {
| ${androidQRCode} | ${iOSQRCode} |
| Desktop :computer: | Web :spider_web: |
| ${desktopLink} | ${webLink} |
| ${desktopQRCode} | ${webQRCode} |`;
| ${desktopQRCode} | ${webQRCode} |

---

:eyes: [View the workflow run that generated this build](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}) :eyes:
`;

return message;
}
Expand All @@ -54,20 +61,44 @@ function getTestBuildMessage() {
* @param {String} message
* @returns {Promise<void>}
*/
function commentPR(PR, message) {
async function commentPR(PR, message) {
console.log(`Posting test build comment on #${PR}`);
return GithubUtils.createComment(context.repo.repo, PR, message)
.then(() => console.log(`Comment created on #${PR} successfully 🎉`))
.catch((err) => {
console.log(`Unable to write comment on #${PR} 😞`);
core.setFailed(err.message);
});
try {
await GithubUtils.createComment(context.repo.repo, PR, message);
console.log(`Comment created on #${PR} successfully 🎉`);
} catch (err) {
console.log(`Unable to write comment on #${PR} 😞`);
core.setFailed(err.message);
}
}

const run = function () {
async function run() {
const PR_NUMBER = core.getInput('PR_NUMBER', {required: true});
return commentPR(PR_NUMBER, getTestBuildMessage()).then(() => Promise.resolve());
};
const comments = await GithubUtils.paginate(
GithubUtils.octokit.issues.listComments,
{
owner: CONST.GITHUB_OWNER,
repo: CONST.APP_REPO,
issue_number: PR_NUMBER,
per_page: 100,
},
(response) => response.data,
);
const testBuildComment = _.find(comments, (comment) => comment.body.startsWith(':test_tube::test_tube: Use the links below to test this adhoc build'));
if (testBuildComment) {
console.log('Found previous build comment, hiding it', testBuildComment);
await GithubUtils.graphql(`
mutation {
minimizeComment(input: {classifier: OUTDATED, subjectId: "${testBuildComment.node_id}"}) {
minimizedComment {
minimizedReason
}
}
}
`);
}
await commentPR(PR_NUMBER, getTestBuildMessage());
}

if (require.main === require.cache[eval('__filename')]) {
run();
Expand Down Expand Up @@ -173,6 +204,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
Loading

0 comments on commit c396220

Please sign in to comment.