From 5dd4b2f3f25c3b12c4d68ead238269934016b20f Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Thu, 18 May 2023 19:53:27 +0200 Subject: [PATCH 1/9] doc: GitHub PRs workflow --- .../contributing/github-pr-workflow.rst | 42 +++++++++++++++++++ .../devguide/codebase/contributing/index.rst | 1 + 2 files changed, 43 insertions(+) create mode 100644 doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst diff --git a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst new file mode 100644 index 000000000000..43bf6a3fedbc --- /dev/null +++ b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst @@ -0,0 +1,42 @@ +GitHub PRs workflow +=================== + +Draft PRs +~~~~~~~~~ + +A PR should be marked as `draft` if it is not intended to be merged as is, +but is waiting for some sort of feedback. +The author of the PR should explicit what kind of feedback is expected (CI/QA run, discussion on the code, etc...) + +GitHub filter is ``is:pr is:open draft:true sort:updated-asc`` + +A draft may be closed if it has not been updated in two months. + +Mergeable PRs +~~~~~~~~~~~~~ + +When a Pull Request is intended to be merged as is, the workflow is the following: + 1. get reviewed, and either request changes or get approved + 2. if approved, get staged in a next branch (with other PRs), wait for CI validation + (and eventually request changes if CI finds anything) + 3. get merged and closed + +A newly created PR should match the filter +``is:pr is:open draft:false review:none sort:updated-asc no:assignee`` +The whole team is responsible to assign a PR to someone precise within 2 weeks. + +When someone gets assigned a PR, the PR should get a review status within 2 weeks: +either changes requested, approved, or assigned to someone else if more expertise is needed. + +GitHub filter for changes-requested PRs is ``is:pr is:open draft:false sort:updated-asc review:changes-requested`` + +Such a PR may be closed if it has not been updated in two months. +It is expected that the author creates a new PR with a new version of the patch as described in :ref:`Pull Requests Criteria `. + +#TODO filter does not work cf https://github.com/OISF/suricata/pull/8898 + +GitHub filter for approved PRs that should go in a next branch is ``is:pr is:open draft:false sort:updated-asc review:approved`` + +Command to get approved PRs is ``gh pr list --json number,reviewDecision --search "state:open type:pr -review:none" | jq '.[] | select(.reviewDecision=="")'`` + +Once in approved state, the PRs are in the responsibility of the merger, along with the next branches/PRs. diff --git a/doc/userguide/devguide/codebase/contributing/index.rst b/doc/userguide/devguide/codebase/contributing/index.rst index 4c9089e48427..e0d29125bbdd 100644 --- a/doc/userguide/devguide/codebase/contributing/index.rst +++ b/doc/userguide/devguide/codebase/contributing/index.rst @@ -6,3 +6,4 @@ Contributing contribution-process code-submission-process + github-pr-workflow From b946d1e52b33ff6c121702b0f1665765ea70b97f Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Wed, 31 May 2023 17:41:30 +0200 Subject: [PATCH 2/9] Update doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst Co-authored-by: Juliana Fajardini Reichow --- .../devguide/codebase/contributing/github-pr-workflow.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst index 43bf6a3fedbc..e18c227c5719 100644 --- a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst +++ b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst @@ -18,7 +18,7 @@ Mergeable PRs When a Pull Request is intended to be merged as is, the workflow is the following: 1. get reviewed, and either request changes or get approved 2. if approved, get staged in a next branch (with other PRs), wait for CI validation - (and eventually request changes if CI finds anything) + (and eventually request changes if CI finds anything) 3. get merged and closed A newly created PR should match the filter From 575a51d1fa17984eace09863f1371f24c7f329bb Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Wed, 31 May 2023 17:41:44 +0200 Subject: [PATCH 3/9] Update doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst Co-authored-by: Juliana Fajardini Reichow --- .../devguide/codebase/contributing/github-pr-workflow.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst index e18c227c5719..2d936703e783 100644 --- a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst +++ b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst @@ -6,7 +6,8 @@ Draft PRs A PR should be marked as `draft` if it is not intended to be merged as is, but is waiting for some sort of feedback. -The author of the PR should explicit what kind of feedback is expected (CI/QA run, discussion on the code, etc...) +The author of the PR should explicit what kind of feedback is expected (CI/QA +run, discussion on the code, etc...) GitHub filter is ``is:pr is:open draft:true sort:updated-asc`` From 30862758d324a27ae082a0f490aecc3f65c4606d Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Wed, 31 May 2023 17:41:56 +0200 Subject: [PATCH 4/9] Update doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst Co-authored-by: Juliana Fajardini Reichow --- .../devguide/codebase/contributing/github-pr-workflow.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst index 2d936703e783..097d4dff53ce 100644 --- a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst +++ b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst @@ -32,7 +32,8 @@ either changes requested, approved, or assigned to someone else if more expertis GitHub filter for changes-requested PRs is ``is:pr is:open draft:false sort:updated-asc review:changes-requested`` Such a PR may be closed if it has not been updated in two months. -It is expected that the author creates a new PR with a new version of the patch as described in :ref:`Pull Requests Criteria `. +It is expected that the author creates a new PR with a new version of the patch +as described in :ref:`Pull Requests Criteria `. #TODO filter does not work cf https://github.com/OISF/suricata/pull/8898 From bd9667ddf339d7aece7481ea4b0003bc67436885 Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Wed, 31 May 2023 17:42:04 +0200 Subject: [PATCH 5/9] Update doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst Co-authored-by: Juliana Fajardini Reichow --- .../devguide/codebase/contributing/github-pr-workflow.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst index 097d4dff53ce..7e132c923ad1 100644 --- a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst +++ b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst @@ -41,4 +41,5 @@ GitHub filter for approved PRs that should go in a next branch is ``is:pr is:ope Command to get approved PRs is ``gh pr list --json number,reviewDecision --search "state:open type:pr -review:none" | jq '.[] | select(.reviewDecision=="")'`` -Once in approved state, the PRs are in the responsibility of the merger, along with the next branches/PRs. +Once in approved state, the PRs are in the responsibility of the merger, along +with the next branches/PRs. From 50b81a9637cb4dd58d1533b9a2388e0f4ae7affb Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Wed, 31 May 2023 17:42:13 +0200 Subject: [PATCH 6/9] Update doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst Co-authored-by: Juliana Fajardini Reichow --- .../devguide/codebase/contributing/github-pr-workflow.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst index 7e132c923ad1..ae1c158ae068 100644 --- a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst +++ b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst @@ -29,7 +29,8 @@ The whole team is responsible to assign a PR to someone precise within 2 weeks. When someone gets assigned a PR, the PR should get a review status within 2 weeks: either changes requested, approved, or assigned to someone else if more expertise is needed. -GitHub filter for changes-requested PRs is ``is:pr is:open draft:false sort:updated-asc review:changes-requested`` +GitHub filter for changes-requested PRs is ``is:pr is:open draft:false sort: +updated-asc review:changes-requested`` Such a PR may be closed if it has not been updated in two months. It is expected that the author creates a new PR with a new version of the patch From 6dbe04facb86d58a004961f39429ed7e5d5b14db Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Wed, 31 May 2023 17:42:22 +0200 Subject: [PATCH 7/9] Update doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst Co-authored-by: Juliana Fajardini Reichow --- .../devguide/codebase/contributing/github-pr-workflow.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst index ae1c158ae068..102e24523db0 100644 --- a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst +++ b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst @@ -27,7 +27,8 @@ A newly created PR should match the filter The whole team is responsible to assign a PR to someone precise within 2 weeks. When someone gets assigned a PR, the PR should get a review status within 2 weeks: -either changes requested, approved, or assigned to someone else if more expertise is needed. +either changes requested, approved, or assigned to someone else if more +expertise is needed. GitHub filter for changes-requested PRs is ``is:pr is:open draft:false sort: updated-asc review:changes-requested`` From 93700855cc21950a7928b0a6a979da834c14961c Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Wed, 31 May 2023 17:42:41 +0200 Subject: [PATCH 8/9] Update doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst Co-authored-by: Juliana Fajardini Reichow --- .../devguide/codebase/contributing/github-pr-workflow.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst index 102e24523db0..3c8a797fadbe 100644 --- a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst +++ b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst @@ -39,7 +39,8 @@ as described in :ref:`Pull Requests Criteria `. #TODO filter does not work cf https://github.com/OISF/suricata/pull/8898 -GitHub filter for approved PRs that should go in a next branch is ``is:pr is:open draft:false sort:updated-asc review:approved`` +GitHub filter for approved PRs that should go in a next branch is ``is:pr is:open +draft:false sort:updated-asc review:approved`` Command to get approved PRs is ``gh pr list --json number,reviewDecision --search "state:open type:pr -review:none" | jq '.[] | select(.reviewDecision=="")'`` From 5efb041d686fb06ff1f739dbf87b324e3c4447a2 Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Wed, 31 May 2023 17:42:52 +0200 Subject: [PATCH 9/9] Update doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst Co-authored-by: Juliana Fajardini Reichow --- .../devguide/codebase/contributing/github-pr-workflow.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst index 3c8a797fadbe..0b164a2fbb5d 100644 --- a/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst +++ b/doc/userguide/devguide/codebase/contributing/github-pr-workflow.rst @@ -42,7 +42,8 @@ as described in :ref:`Pull Requests Criteria `. GitHub filter for approved PRs that should go in a next branch is ``is:pr is:open draft:false sort:updated-asc review:approved`` -Command to get approved PRs is ``gh pr list --json number,reviewDecision --search "state:open type:pr -review:none" | jq '.[] | select(.reviewDecision=="")'`` +Command to get approved PRs is ``gh pr list --json number,reviewDecision --search +"state:open type:pr -review:none" | jq '.[] | select(.reviewDecision=="")'`` Once in approved state, the PRs are in the responsibility of the merger, along with the next branches/PRs.