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

chore: code-review-quality workflow #39

Merged
merged 3 commits into from
Jun 7, 2024
Merged

chore: code-review-quality workflow #39

merged 3 commits into from
Jun 7, 2024

Conversation

h1alexbel
Copy link
Owner

@h1alexbel h1alexbel commented Jun 7, 2024

code review quality control


PR-Codex overview

This PR adds a code review workflow that triggers on submitted pull request reviews and runs a code review action when the review is approved.

Detailed summary

  • Added MIT License to the workflow file
  • Defined a code review workflow triggered by approved pull request reviews
  • Configured the workflow to run a specific code review action with necessary tokens and model information

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

codecov bot commented Jun 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 22.58%. Comparing base (b09cb51) to head (2ab4905).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #39   +/-   ##
=======================================
  Coverage   22.58%   22.58%           
=======================================
  Files           3        3           
  Lines          31       31           
=======================================
  Hits            7        7           
  Misses         24       24           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@h1alexbel
Copy link
Owner Author

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Jun 7, 2024

@rultor merge

@h1alexbel OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Jun 7, 2024

@rultor merge

@h1alexbel Oops, I failed. You can see the full log here (spent 1min)

+ sensitive=()
+ rm -rf .gnupg
+ cd repo
+ git remote add fork [email protected]:h1alexbel/fakehub.git
+ git remote update
Fetching origin
Fetching fork
From github.com:h1alexbel/fakehub
 * [new branch]      11         -> fork/11
 * [new branch]      chore      -> fork/chore
 * [new branch]      master     -> fork/master
 * [new branch]      xml        -> fork/xml
+ args=
+ '[' default == default ']'
+ args=' --ff'
+ '[' default == no ']'
+ '[' default == only ']'
+ export BRANCH=__rultor
+ BRANCH=__rultor
++ wc -l
++ git show-branch __rultor
+ '[' 0 -gt 0 ']'
+ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
+ git checkout -B __rultor fork/chore
Switched to a new branch '__rultor'
Branch '__rultor' set up to track remote branch 'chore' from 'fork'.
+ git checkout -B master origin/master
Switched to and reset branch 'master'
Branch 'master' set up to track remote branch 'master' from 'origin'.
Your branch is up to date with 'origin/master'.
+ '[' false == true ']'
+ '[' false == true ']'
+ git merge --ff __rultor
Updating b09cb51..8575aee
Fast-forward
 .github/workflows/code-review-quality.yml | 38 +++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 .github/workflows/code-review-quality.yml
+ docker_when_possible
+ true
++ tail -n 1
++ sed 's/ /\n/g'
++ uptime
+ load=0.14
++ bc
++ echo 0.14 '>' 30
+ '[' 0 -eq 1 ']'
+ echo 'load average is 0.14, low enough to run a new Docker container'
load average is 0.14, low enough to run a new Docker container
+ break
+ cd ..
+ '[' -n '' ']'
+ use_image=_/rust:latest
+ docker pull _/rust:latest
invalid reference format
'cid' file is absent, most probably the Docker container wasn't started correctly

@h1alexbel
Copy link
Owner Author

@rultor merge again

@rultor
Copy link
Collaborator

rultor commented Jun 7, 2024

@rultor merge again

@h1alexbel OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Jun 7, 2024

@rultor merge again

@h1alexbel Oops, I failed. You can see the full log here (spent 1min)

bf2c3e352f3d: Download complete
c6cf28de8a06: Pull complete
891494355808: Pull complete
6582c62583ef: Pull complete
bf2c3e352f3d: Pull complete
63d588af17b3: Pull complete
Digest: sha256:5907e96b0293eb53bcc8f09b4883d71449808af289862950ede9a0e3cca44ff5
Status: Downloaded newer image for rust:latest
docker.io/library/rust:latest
+ grep --quiet '\sh1alexbel_fakehub_39\s*$'
+ docker ps --filter=status=exited
+ ls -al .
total 48
drwx------  3 ubuntu ubuntu 4096 Jun  7 16:20 .
drwxrwxrwt 12 root   root   4096 Jun  7 16:20 ..
-rw-rw-r--  1 ubuntu ubuntu   57 Jun  7 16:19 credentials
-rwxrwxr-x  1 ubuntu ubuntu  556 Jun  7 16:19 end.sh
-rwxrwxr-x  1 ubuntu ubuntu  490 Jun  7 16:20 entry.sh
-rw-rw-r--  1 ubuntu ubuntu    5 Jun  7 16:19 pid
drwxrwxr-x  6 ubuntu ubuntu 4096 Jun  7 16:20 repo
-rwxrwxr-x  1 ubuntu ubuntu 6134 Jun  7 16:19 run.sh
-rw-rw-r--  1 ubuntu ubuntu  616 Jun  7 16:20 script.sh
-rw-rw-r--  1 ubuntu ubuntu 5990 Jun  7 16:20 stdout
++ pwd
++ pwd
+ docker run -t --rm -v /tmp/rultor-G8Jh:/main [email protected]:h1alexbel/fakehub.git --env=pull_id=39 [email protected]:h1alexbel/fakehub.git --env=fork_branch=chore --env=head_branch=master '--env=pull_title=chore: code-review-quality workflow' --env=author=h1alexbel '--env=scripts=( '\''export '\''\'\'''\''[email protected]:h1alexbel/fakehub.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_id=39'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''[email protected]:h1alexbel/fakehub.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''fork_branch=chore'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_title=chore: code-review-quality workflow'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''author=h1alexbel'\''\'\'''\'''\'' '\'';'\'' '\''pdd --file=/dev/null'\'' '\'';'\'' '\''sudo apt -y install rustc'\'' '\'';'\'' '\''rustc -V'\'' '\'';'\'' '\''cargo --color=never test -vv'\'' '\'';'\'' '\''cargo --color=never fmt --check'\'' '\'';'\'' '\''cargo doc --no-deps'\'' '\'';'\'' '\''cargo clippy'\'' '\'';'\'' )' --hostname=docker --privileged --memory=8g --memory-swap=16g --oom-kill-disable --cidfile=/tmp/rultor-G8Jh/cid -w=/main -v /var/run/docker.sock:/var/run/docker.sock --name=h1alexbel_fakehub_39 rust:latest /main/entry.sh
WARNING: Your kernel does not support OomKillDisable. OomKillDisable discarded.
+ set -e
+ set -o pipefail
+ shopt -s dotglob
+ useradd -m -G sudo r
++ awk -F : '$3 > 100 { print $1 }'
++ cat /etc/group
+ for g in $(cat /etc/group | awk -F ':' '$3 > 100 { print $1 }')
+ usermod -a -G nogroup r
+ for g in $(cat /etc/group | awk -F ':' '$3 > 100 { print $1 }')
+ usermod -a -G _ssh r
+ for g in $(cat /etc/group | awk -F ':' '$3 > 100 { print $1 }')
+ usermod -a -G r r
+ usermod -s /bin/bash r
+ echo '%sudo ALL=(ALL) NOPASSWD:ALL'
+ cp -R /root/.bashrc /root/.profile /home/r
+ cp -R ./cid ./credentials ./end.sh ./entry.sh ./pid ./repo ./run.sh ./script.sh ./stdout /home/r
+ rm -rf repo
+ chown -R r:r /home/r
+ chmod a+x /home/r/script.sh
+ cat /home/r/script.sh
#!/bin/bash
set -e
set -o pipefail
if [ -e /home/r/.profile ]; then source /home/r/.profile; fi
shopt -s expand_aliases
alias 'sudo=sudo -i'
export HOME=/home/r
cd "${HOME}/repo"
export '[email protected]:h1alexbel/fakehub.git' ; export 'pull_id=39' ; export '[email protected]:h1alexbel/fakehub.git' ; export 'fork_branch=chore' ; export 'head_branch=master' ; export 'pull_title=chore: code-review-quality workflow' ; export 'author=h1alexbel' ; pdd --file=/dev/null ; sudo apt -y install rustc ; rustc -V ; cargo --color=never test -vv ; cargo --color=never fmt --check ; cargo doc --no-deps ; cargo clippy ;
+ su --login r --command /home/r/script.sh
/home/r/script.sh: line 9: pdd: command not found
container b3b69106b499fac01e3f463962acc795760ba6bea6c93d2feb2f41765f40ad8e is dead
Fri Jun  7 16:21:06 UTC 2024

@h1alexbel
Copy link
Owner Author

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Jun 7, 2024

@rultor merge

@h1alexbel OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Jun 7, 2024

@rultor merge

@h1alexbel Oops, I failed. You can see the full log here (spent 1min)

bf2c3e352f3d: Download complete
c6cf28de8a06: Pull complete
891494355808: Pull complete
6582c62583ef: Pull complete
bf2c3e352f3d: Pull complete
63d588af17b3: Pull complete
Digest: sha256:5907e96b0293eb53bcc8f09b4883d71449808af289862950ede9a0e3cca44ff5
Status: Downloaded newer image for rust:latest
docker.io/library/rust:latest
+ grep --quiet '\sh1alexbel_fakehub_39\s*$'
+ docker ps --filter=status=exited
+ ls -al .
total 48
drwx------  3 ubuntu ubuntu 4096 Jun  7 16:28 .
drwxrwxrwt 12 root   root   4096 Jun  7 16:29 ..
-rw-rw-r--  1 ubuntu ubuntu   57 Jun  7 16:28 credentials
-rwxrwxr-x  1 ubuntu ubuntu  556 Jun  7 16:28 end.sh
-rwxrwxr-x  1 ubuntu ubuntu  490 Jun  7 16:28 entry.sh
-rw-rw-r--  1 ubuntu ubuntu    5 Jun  7 16:28 pid
drwxrwxr-x  6 ubuntu ubuntu 4096 Jun  7 16:28 repo
-rwxrwxr-x  1 ubuntu ubuntu 5950 Jun  7 16:28 run.sh
-rw-rw-r--  1 ubuntu ubuntu  554 Jun  7 16:28 script.sh
-rw-rw-r--  1 ubuntu ubuntu 5732 Jun  7 16:29 stdout
++ pwd
++ pwd
+ docker run -t --rm -v /tmp/rultor-CXE8:/main [email protected]:h1alexbel/fakehub.git --env=pull_id=39 [email protected]:h1alexbel/fakehub.git --env=fork_branch=chore --env=head_branch=master '--env=pull_title=chore: code-review-quality workflow' --env=author=h1alexbel '--env=scripts=( '\''export '\''\'\'''\''[email protected]:h1alexbel/fakehub.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_id=39'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''[email protected]:h1alexbel/fakehub.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''fork_branch=chore'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_title=chore: code-review-quality workflow'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''author=h1alexbel'\''\'\'''\'''\'' '\'';'\'' '\''cargo --color=never test -vv'\'' '\'';'\'' '\''cargo --color=never fmt --check'\'' '\'';'\'' '\''cargo doc --no-deps'\'' '\'';'\'' '\''cargo clippy'\'' '\'';'\'' )' --hostname=docker --privileged --memory=8g --memory-swap=16g --oom-kill-disable --cidfile=/tmp/rultor-CXE8/cid -w=/main -v /var/run/docker.sock:/var/run/docker.sock --name=h1alexbel_fakehub_39 rust:latest /main/entry.sh
WARNING: Your kernel does not support OomKillDisable. OomKillDisable discarded.
+ set -e
+ set -o pipefail
+ shopt -s dotglob
+ useradd -m -G sudo r
++ awk -F : '$3 > 100 { print $1 }'
++ cat /etc/group
+ for g in $(cat /etc/group | awk -F ':' '$3 > 100 { print $1 }')
+ usermod -a -G nogroup r
+ for g in $(cat /etc/group | awk -F ':' '$3 > 100 { print $1 }')
+ usermod -a -G _ssh r
+ for g in $(cat /etc/group | awk -F ':' '$3 > 100 { print $1 }')
+ usermod -a -G r r
+ usermod -s /bin/bash r
+ echo '%sudo ALL=(ALL) NOPASSWD:ALL'
+ cp -R /root/.bashrc /root/.profile /home/r
+ cp -R ./cid ./credentials ./end.sh ./entry.sh ./pid ./repo ./run.sh ./script.sh ./stdout /home/r
+ rm -rf repo
+ chown -R r:r /home/r
+ chmod a+x /home/r/script.sh
+ cat /home/r/script.sh
#!/bin/bash
set -e
set -o pipefail
if [ -e /home/r/.profile ]; then source /home/r/.profile; fi
shopt -s expand_aliases
alias 'sudo=sudo -i'
export HOME=/home/r
cd "${HOME}/repo"
export '[email protected]:h1alexbel/fakehub.git' ; export 'pull_id=39' ; export '[email protected]:h1alexbel/fakehub.git' ; export 'fork_branch=chore' ; export 'head_branch=master' ; export 'pull_title=chore: code-review-quality workflow' ; export 'author=h1alexbel' ; cargo --color=never test -vv ; cargo --color=never fmt --check ; cargo doc --no-deps ; cargo clippy ;
+ su --login r --command /home/r/script.sh
/home/r/script.sh: line 9: cargo: command not found
container aab31891c708c4f6295ec65552378b037a6b7987a0331d206024e1f21893fc6a is dead
Fri Jun  7 16:29:50 UTC 2024

@l3r8yJ
Copy link
Collaborator

l3r8yJ commented Jun 7, 2024

@h1alexbel I think for a while we can do manual mergers as we have CI pipeline

@h1alexbel
Copy link
Owner Author

ref for #11

@h1alexbel h1alexbel merged commit c0e8801 into master Jun 7, 2024
14 checks passed
@h1alexbel h1alexbel deleted the chore branch June 7, 2024 19:04
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.

3 participants