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

Add pending_version state handling, Fix getGist async issue #11

Merged
merged 8 commits into from
Apr 2, 2022

Conversation

k-lpmg
Copy link
Contributor

@k-lpmg k-lpmg commented Mar 25, 2022

Features

1. auto-indent to sources

  • While working, vscode automatically indented.

2. fix fetch_app_state

  • Add in_review_version_info, pending_version_info, latest_version_info to fetch_app_status.rb
  • I've been testing it for a month and it's been working fine without any issues.
  • Issue Link

3. getGist async issue

  • If getGist is executed asynchronously and the response is slower than execution of exec fetch_app_status, there is a case where the contents of the gist cannot be loaded and the duplicate app state is sent to Slack.
  • So, I created the main function and applied await to getGist.
const main = async () => {
  await getGist();

  exec(
    "ruby Sources/fetch_app_status.rb",
    { env: env },
    function (err, stdout, stderr) {
      if (stdout) {
        var apps = JSON.parse(stdout);
        console.log(apps);
        for (let app of apps) {
          checkVersion(app);
        }
      } else {
        console.log("There was a problem fetching the status of the app!");
        console.log(stderr);
      }
    }
  );
};

...

main()

Third party

+ "request-promise-native": "^1.0.9"

PR Links

* fix: typo

* feat: Update get_app_state logic from in_review, pending

* feat: Add test code

* feat: Add test code

* feat: Add test code

* feat: Add test code

* feat: Add latest_version_info to fetch_app_status

* fix: typo
* feat: Add await when getGist

* feat: Add await to request

* feat: Add request-promise-native

* fix: request for awat in check_status.js

* fix: writeFile in check_status.js
* feat: Add await to check_status.js

* feat: Add await to updateGist in check_status.js

* feat: Add main func to check_status.js

* feat: Add async to checkVersion

* feat: Add async when db on load

* fix: check_status.js
# Conflicts:
#	.github/workflows/fetch.yml
#	Sources/slack.js
@k-lpmg k-lpmg changed the title Add pending_version state handling, Add pending_version state handling, Fix getGist async issue Mar 25, 2022
@techinpark techinpark self-requested a review March 29, 2022 05:39
@techinpark
Copy link
Owner

@k-lpmg Thanks for contribution again! I will check this feature soon. 👍

Copy link
Owner

@techinpark techinpark left a comment

Choose a reason for hiding this comment

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

Great 💯 Thanks for contributions @k-lpmg !

Comment on lines +8 to +10
in_review_version_info = app.get_in_review_app_store_version
pending_version_info = app.get_pending_release_app_store_version
latest_version_info = app.get_latest_app_store_version
Copy link
Owner

Choose a reason for hiding this comment

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

I didn't know that. get_in_review_app_store_version Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

get_in_review_app_store_version returns the status when the app store reviewer has started the build review process.

@techinpark techinpark merged commit 338c0a0 into techinpark:master Apr 2, 2022
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.

2 participants