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

Auto-generate data with ECMA262 PRs? #1

Open
bterlson opened this issue Mar 31, 2016 · 7 comments
Open

Auto-generate data with ECMA262 PRs? #1

bterlson opened this issue Mar 31, 2016 · 7 comments

Comments

@bterlson
Copy link

It would be great if we could set up a travis job on the ECMA262 repo to produce the necessary files and add a comment to the PR thread with a link to the diff.

(I am not sure how to accomplish this so I am merely communicating a dream here :))

@arai-a
Copy link
Owner

arai-a commented Mar 31, 2016

Thank you for your suggestion :D

With current build script, required things to do for each PR would be following:

  1. Update a ecma262 repository cloned inside ecma262-compare directory (that would contain a parent changeset of the PR)
    python build.py update
  2. Download the PR's changesets and build HTML file for each changeset
    python build.py pr PR_NUMBER
  3. Commit whole files changed/added with steps 1 and 2, and push it to github
  4. Get an URL for the PR diff, maybe something like
    http://{USER}.github.io/ecma262-compare/#from={PARENT_HASH}&to=PR/{PR_NUMBER}/{HEAD_HASH}&id={SECTION_ID}&pr={PR_NUMBER}
    or some more optimized one, ...#pr={PR_NUMBER}, not yet implemented tho
  5. Post it as a PR comment

For this use case, there may be some issue.

Whole diff generation is done in client side, and it might take long time.
specifically for PR, it might be better do it on server side, and provide the generated diff in some format.

Also, issue #2, and issue #3 might be better fixed before this use case, to avoid so long diff calculation.

@arai-a
Copy link
Owner

arai-a commented Apr 7, 2016

Now the slowness is mostly solved. maybe we could do diff generation in worker thread, but it won't affect much, as issue #3 is solved and most section won't contain so much text.

@arai-a
Copy link
Owner

arai-a commented Apr 7, 2016

One more script extract.py is added to extract information from generated HTML file.
Now it should be run after build.py update or build.py pr PR_NUMBER.
I'll merge it to build.py later.

@arai-a
Copy link
Owner

arai-a commented Apr 16, 2016

Added a dedicated URL for PR, like http://arai-a.github.io/ecma262-compare/#pr=458

@arai-a
Copy link
Owner

arai-a commented Feb 12, 2020

Now data for PRs are updated every 30 minutes (if there are more than 5 changes within 30 minutes, oldest 5 PRs are updated).
same for already merged data (up to 5 revisions per 30 minutes).

remaining part:

  • trigger update on PR, instead of periodically
  • post comment to PR when data is generated

@arai-a
Copy link
Owner

arai-a commented Feb 12, 2020

about triggering update on PR, this could be done by repository_dispatch [1] (haven't tried tho, it looks like usable), but there's an issue in the GitHub action,
that, it runs multiple workflows in parallel, while the update action cannot be run in parallel (it results in conflict when push)

about posting comment to PR, I guess it can be done, just by adding that API call to the action.

[1] https://help.github.com/en/actions/reference/events-that-trigger-workflows#external-events-repository_dispatch

@arai-a
Copy link
Owner

arai-a commented Feb 14, 2020

Separated into issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants