Skip to content
Snippets Groups Projects
Commit 3de1d954 authored by Francisco Perez's avatar Francisco Perez
Browse files

documenting how to execute helpers

parent 92ac4919
No related branches found
No related tags found
No related merge requests found
# Adding branch protection rules
This task is tracked on gitlab [security/internal/projects-coordination](https://gitlab.eclipse.org/eclipsefdn/security/internal/projects-coordination) with id: [3](https://gitlab.eclipse.org/eclipsefdn/security/internal/projects-coordination/-/issues/3)
# HOW-TO: Executing helpers
```bash
bash -c 'source /home/fperezel/projects/fperezel/branch_protection/helpers.sh; cloning_repo eclipse-packaging'
cd eclipse-packaging/eclipsefdn/
bash -c 'source /home/fperezel/projects/fperezel/branch_protection/helpers.sh; creating_full_issue eclipse-packaging'
```
* Please bear in mind that ```helpers.sh``` has been renamed to ```adding_branch_protection_helpers.sh```
......@@ -151,4 +151,11 @@ creating_full_issue(){
adding_comment_about_otterdog ${repo_name}
echo "Ading comment about where listing repos"
adding_comment_about_list_of_repos ${repo_name}
}
## otterdogdb.organizations.json generated by MongoDB from query otterdog_database/doc/mongdb_queries/local/repositories_list_grouped_by_github.js
## Adding at the end only github_id projection
get_repo_list(){
jq -r 'map([.github_id] | @csv) | join("\n")' otterdogdb.organizations.json
}
\ No newline at end of file
[{
"github_id": "eclipse-tractusx"
},
{
"github_id": "adoptium"
},
{
"github_id": "eclipse-volttron"
},
{
"github_id": "eclipse-zenoh"
},
{
"github_id": "eclipse-edc"
},
{
"github_id": "eclipse-keypop"
},
{
"github_id": "eclipse-mylyn"
},
{
"github_id": "eclipse-kanto"
},
{
"github_id": "eclipse-leda"
},
{
"github_id": "eclipse-esmf"
},
{
"github_id": "eclipse-cdt-cloud"
},
{
"github_id": "eclipse-embed-cdt"
},
{
"github_id": "eclipse-uprotocol"
},
{
"github_id": "eclipse-thingweb"
},
{
"github_id": "eclipse-orbit"
},
{
"github_id": "eclipse-babel"
},
{
"github_id": "eclipse-justj"
},
{
"github_id": "eclipse-kuksa"
},
{
"github_id": "eclipse-sirius"
},
{
"github_id": "eclipse-emf"
},
{
"github_id": "eclipse-ibeji"
},
{
"github_id": "eclipse-oomph"
},
{
"github_id": "eclipse-datatools"
},
{
"github_id": "eclipse-pdt"
},
{
"github_id": "eclipse-cdt"
},
{
"github_id": "eclipse-platform"
},
{
"github_id": "eclipse-jdt"
},
{
"github_id": "eclipse-lsp4j"
},
{
"github_id": "eclipse-wildwebdeveloper"
},
{
"github_id": "eclipse-packaging"
}]
\ No newline at end of file
eclipse-tractusx
adoptium
eclipse-volttron
eclipse-zenoh
eclipse-edc
eclipse-keypop
eclipse-mylyn
eclipse-kanto
eclipse-leda
eclipse-esmf
eclipse-cdt-cloud
eclipse-embed-cdt
eclipse-uprotocol
eclipse-thingweb
eclipse-orbit
eclipse-babel
eclipse-justj
eclipse-kuksa
eclipse-sirius
eclipse-emf
eclipse-ibeji
eclipse-oomph
eclipse-datatools
eclipse-pdt
eclipse-cdt
eclipse-platform
eclipse-jdt
eclipse-lsp4j
eclipse-wildwebdeveloper
eclipse-packaging
db.organizations.aggregate([
{
$project: {
github_id: 1,
repositories: {
$filter: {
input: "$repositories",
as: "repo",
cond: {
$eq: ["$$repo.branch_protection_rules", []]
}
}
}
}
},
{
$addFields: {
total_repositories: { $size: "$repositories" }
}
},
{
$match: {
total_repositories: { $gt: 0 }
}
},
{
$project: {
_id: 0,
github_id: 1,
total_repositories: 1,
repositories_names: "$repositories.name"
}
},
{
$sort: {
total_repositories: -1
}
}, {
$project: {
github_id: 1
}
}
])
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment