1. Apr 26, 2024
    • Javyer's avatar
      review-bot: reverted #4271 and added `workflow_dispatch` (#4293) · d212fc7a
      Javyer authored
      This PR includes two changes:
      - added `workflow_dispatch` to review bot
      - reverted #4271
      
      ### Added `workflow_dispatch` to review bot
      This allows us, in the case that review-bot fails for some fork reasons,
      to trigger it manually ensuring that we can overcame the problem with
      the multiple actions while we look for a solution.
      
      <img width="342" alt="image"
      src="https://github.com/paritytech/polkadot-sdk/assets/8524599/f432f91b-829a-4da4-b4ca-54cc4fe280c8">
      
      ### Reverted #4271
      Unfortunately, the changes added in #4271 do not work in forks.
      
      Here is a lengthy discussion of many individuals facing the same problem
      as me:
      - [GitHub Action `pull_request` attribute empty in `workflow_run` event
      object for PR from forked repo
      #25220](https://github.com/orgs/community/discussions/25220)
      
      So I had to revert it (but I updated the dependencies to latest).
      
      #### Miscellaneous changes
      
      I added a debug log at the end of review bot in case it fails so we can
      easily debug it without having to make a lot of boilerplate and forks to
      duplicate the environment.
      d212fc7a
  2. Apr 24, 2024
    • Javyer's avatar
      Updated review-bot to obtain number from event (#4271) · d29c3636
      Javyer authored
      It seems that `review-trigger` is not uploading the artifact that is
      used by `review-bot`, so I changed the PR-Number to be obtained by the
      previous event that triggered this action.
      
      I also took the liberty to replace `tibdex/github-app-token` for
      `actions/create-github-app-token` which is GitHub's official app.
      d29c3636
  3. Apr 16, 2024
  4. Apr 15, 2024
    • Javyer's avatar
      added script to require a review post push (#3431) · 8b4cfda7
      Javyer authored
      Closes https://github.com/paritytech/opstooling/issues/174
      
      Added a new step in the action that triggers review bot to stop approval
      from new pushes.
      
      This step works in the following way:
      - If the **author of the PR**, who **is not** a member of the org,
      pushed a new commit then:
      - Review-Trigger requests new reviews from the reviewers and fails.
      
      It *does not dismiss reviews*. It simply request them again, but they
      will still be available.
      
      This way, if the author changed something in the code, they will still
      need to have this latest change approved to stop them from uploading
      malicious code.
      
      Find the requested issue linked to this PR (it is from a private repo so
      I can't link it here)
      8b4cfda7
  5. Jan 11, 2024
  6. Nov 15, 2023
    • Alexander Samusev's avatar
      [CI] Prepare CI for Merge Queues (#2308) · 5b0622bc
      Alexander Samusev authored
      PR prepares CI to the GitHub Merge Queues. All github actions that were
      running in PR adjusted so they can run in the merge queues. Zombienet
      jobs will do nothing during PRs but they will run during merge queues.
      
      Jobs that will be skipped during PR:
       - all zombienet jobs
       - all publish docker jobs
      
      Jobs that will be skipped during merge queue:
       - check-labels
       - check-prdoc
       - pr-custom-review
       - review trigger
      
      cc https://github.com/paritytech/ci_cd/issues/862
      5b0622bc
  7. Nov 13, 2023
    • Javyer's avatar
      review-bot: trigger only on review approvals (#2289) · 8d263790
      Javyer authored
      Moved the review event of review-bot to only be triggered in approvals.
      
      Because we only update the required reviews when someone approves, this
      will stop the bot from immediately requesting a new review when someone
      comments or request changes as they should have been already notified in
      the first batch.
      8d263790
  8. Nov 03, 2023
  9. Oct 18, 2023
    • Javyer's avatar
      upgraded review bot to v2.1.0 (#1908) · 1cf7d3aa
      Javyer authored
      Upgraded to version 2.1.0 which has paritytech/review-bot#94, a change
      in the logic of the action to overcome some problems with permissions
      coming from PRs from forks
      
      For this, we needed to divide the actions into two files:
      - A first action that triggers on PRs and reviews and uploads the PR
      number.
      - A second action which is triggered under the completion of the first
      one and runs as the action normally runs (but won't have any problems
      regarding permissions because it is triggered from the master branch)
      1cf7d3aa