@simplysf/simply-gitlab 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/oclif.manifest.json +384 -384
  2. package/package.json +5 -5
@@ -1546,13 +1546,16 @@
1546
1546
  "view:file:gitlab"
1547
1547
  ]
1548
1548
  },
1549
- "gitlab:mr:create": {
1549
+ "gitlab:project:create": {
1550
1550
  "aliases": [],
1551
1551
  "args": {},
1552
- "description": "Both branches must already exist on the project. --draft prefixes the title with \"Draft: \", which is how GitLab itself marks a draft; there is no separate field for it.\n\nAssignees and reviewers are numeric user ids, not usernames — GitLab accepts only ids here. --body or --body-file supplies raw JSON for anything the flags do not cover, such as approval rules. Use --dry-run to see exactly what would be sent.",
1552
+ "description": "Creates the project in --namespace, or in the namespace of the token owner when none is given. Give it --name or --path; GitLab derives whichever one is missing.\n\n--template names one of the built-in templates GitLab ships, such as express or rails. To create from a custom template instead, add --custom-template for one the instance administrator registered, --template-group for one in a group, or use --template-project to name the template project itself by id or path — which GitLab prefers, because a name can be ambiguous. Add --template-group to --template-project when the template belongs to a group rather than the instance. Custom templates need a Premium or Ultimate instance.\n\nA template is applied asynchronously: this command returns as soon as the project record exists, with an import status of \"scheduled\", and the files arrive a few seconds later. Check \"project view\" until its import_status reads \"finished\" before writing to the repository. --dry-run prints the exact request body; a namespace or template given as a path is still looked up, so the printed ids are the ones that would be sent.",
1553
1553
  "examples": [
1554
- "<%= config.bin %> <%= command.id %> --project group/project --source-branch feature --target-branch main --title \"feat: the thing\"",
1555
- "<%= config.bin %> <%= command.id %> --project group/project --source-branch feature --target-branch main --title wip --draft --squash"
1554
+ "<%= config.bin %> <%= command.id %> --name new-service --namespace platform/apps",
1555
+ "<%= config.bin %> <%= command.id %> --name new-service --namespace platform/apps --template express --visibility internal",
1556
+ "<%= config.bin %> <%= command.id %> --name new-service --namespace platform/apps --template service-skeleton --template-group platform/templates",
1557
+ "<%= config.bin %> <%= command.id %> --path new-service --template-project platform/templates/service-skeleton --dry-run",
1558
+ "<%= config.bin %> <%= command.id %> --name new-service --template-project platform/templates/service-skeleton --template-group platform/templates"
1556
1559
  ],
1557
1560
  "flags": {
1558
1561
  "json": {
@@ -1590,92 +1593,96 @@
1590
1593
  "multiple": false,
1591
1594
  "type": "option"
1592
1595
  },
1593
- "project": {
1594
- "char": "p",
1595
- "env": "GITLAB_PROJECT",
1596
- "name": "project",
1597
- "required": true,
1598
- "summary": "Project id, or its full path such as group/subgroup/project.",
1599
- "hasDynamicHelp": false,
1600
- "multiple": false,
1601
- "type": "option"
1602
- },
1603
1596
  "dry-run": {
1604
1597
  "name": "dry-run",
1605
1598
  "summary": "Print the request that would be sent and exit without sending it.",
1606
1599
  "allowNo": false,
1607
1600
  "type": "boolean"
1608
1601
  },
1609
- "source-branch": {
1610
- "name": "source-branch",
1611
- "summary": "Branch holding the changes.",
1602
+ "name": {
1603
+ "name": "name",
1604
+ "summary": "Project name. The path is derived from it when --path is not given.",
1612
1605
  "hasDynamicHelp": false,
1613
1606
  "multiple": false,
1614
1607
  "type": "option"
1615
1608
  },
1616
- "target-branch": {
1617
- "name": "target-branch",
1618
- "summary": "Branch the changes are proposed for.",
1609
+ "path": {
1610
+ "name": "path",
1611
+ "summary": "Repository path, the URL slug. The name is derived from it when --name is not given.",
1619
1612
  "hasDynamicHelp": false,
1620
1613
  "multiple": false,
1621
1614
  "type": "option"
1622
1615
  },
1623
- "title": {
1624
- "name": "title",
1625
- "summary": "Merge request title.",
1616
+ "namespace": {
1617
+ "description": "Defaults to the namespace of the token owner.",
1618
+ "name": "namespace",
1619
+ "summary": "Group or user namespace to create the project in, by id or full path.",
1626
1620
  "hasDynamicHelp": false,
1627
1621
  "multiple": false,
1628
1622
  "type": "option"
1629
1623
  },
1630
1624
  "description": {
1631
1625
  "name": "description",
1632
- "summary": "Merge request description, as Markdown.",
1626
+ "summary": "Project description.",
1633
1627
  "hasDynamicHelp": false,
1634
1628
  "multiple": false,
1635
1629
  "type": "option"
1636
1630
  },
1637
- "draft": {
1638
- "name": "draft",
1639
- "summary": "Open it as a draft.",
1640
- "allowNo": false,
1641
- "type": "boolean"
1631
+ "visibility": {
1632
+ "name": "visibility",
1633
+ "summary": "Who can see the project.",
1634
+ "hasDynamicHelp": false,
1635
+ "multiple": false,
1636
+ "options": [
1637
+ "private",
1638
+ "internal",
1639
+ "public"
1640
+ ],
1641
+ "type": "option"
1642
1642
  },
1643
- "squash": {
1644
- "name": "squash",
1645
- "summary": "Squash the commits when it merges.",
1646
- "allowNo": false,
1647
- "type": "boolean"
1643
+ "default-branch": {
1644
+ "name": "default-branch",
1645
+ "summary": "Name of the default branch.",
1646
+ "hasDynamicHelp": false,
1647
+ "multiple": false,
1648
+ "type": "option"
1648
1649
  },
1649
- "remove-source-branch": {
1650
- "name": "remove-source-branch",
1651
- "summary": "Delete the source branch on merge.",
1650
+ "initialize-with-readme": {
1651
+ "name": "initialize-with-readme",
1652
+ "summary": "Create a first commit holding a README, so the repository is not empty.",
1652
1653
  "allowNo": false,
1653
1654
  "type": "boolean"
1654
1655
  },
1655
- "assignee-id": {
1656
- "name": "assignee-id",
1657
- "summary": "User id to assign. Repeatable.",
1656
+ "topics": {
1657
+ "name": "topics",
1658
+ "summary": "Comma-separated topics to label the project with.",
1658
1659
  "hasDynamicHelp": false,
1659
- "multiple": true,
1660
+ "multiple": false,
1660
1661
  "type": "option"
1661
1662
  },
1662
- "reviewer-id": {
1663
- "name": "reviewer-id",
1664
- "summary": "User id to request review from. Repeatable.",
1663
+ "template": {
1664
+ "name": "template",
1665
+ "summary": "Template to create from: a built-in name, or with --custom-template or --template-group a custom one.",
1665
1666
  "hasDynamicHelp": false,
1666
- "multiple": true,
1667
+ "multiple": false,
1667
1668
  "type": "option"
1668
1669
  },
1669
- "labels": {
1670
- "name": "labels",
1671
- "summary": "Comma-separated labels to apply.",
1670
+ "custom-template": {
1671
+ "name": "custom-template",
1672
+ "summary": "Look --template up among the instance's custom project templates rather than the built-in ones.",
1673
+ "allowNo": false,
1674
+ "type": "boolean"
1675
+ },
1676
+ "template-group": {
1677
+ "name": "template-group",
1678
+ "summary": "Group whose custom project templates --template or --template-project names, by id or full path.",
1672
1679
  "hasDynamicHelp": false,
1673
1680
  "multiple": false,
1674
1681
  "type": "option"
1675
1682
  },
1676
- "milestone-id": {
1677
- "name": "milestone-id",
1678
- "summary": "Milestone id to attach.",
1683
+ "template-project": {
1684
+ "name": "template-project",
1685
+ "summary": "Custom template project to create from, by id or full path. Cannot be combined with --template.",
1679
1686
  "hasDynamicHelp": false,
1680
1687
  "multiple": false,
1681
1688
  "type": "option"
@@ -1700,12 +1707,12 @@
1700
1707
  },
1701
1708
  "hasDynamicHelp": false,
1702
1709
  "hiddenAliases": [],
1703
- "id": "gitlab:mr:create",
1710
+ "id": "gitlab:project:create",
1704
1711
  "pluginAlias": "@simplysf/simply-gitlab",
1705
1712
  "pluginName": "@simplysf/simply-gitlab",
1706
1713
  "pluginType": "core",
1707
1714
  "strict": true,
1708
- "summary": "Open a merge request.",
1715
+ "summary": "Create a project, blank or from a template.",
1709
1716
  "enableJsonFlag": true,
1710
1717
  "isWrite": true,
1711
1718
  "isESM": true,
@@ -1713,27 +1720,27 @@
1713
1720
  "lib",
1714
1721
  "commands",
1715
1722
  "gitlab",
1716
- "mr",
1723
+ "project",
1717
1724
  "create.js"
1718
1725
  ],
1719
1726
  "aliasPermutations": [],
1720
1727
  "permutations": [
1721
- "gitlab:mr:create",
1722
- "mr:gitlab:create",
1723
- "mr:create:gitlab",
1724
- "gitlab:create:mr",
1725
- "create:gitlab:mr",
1726
- "create:mr:gitlab"
1728
+ "gitlab:project:create",
1729
+ "project:gitlab:create",
1730
+ "project:create:gitlab",
1731
+ "gitlab:create:project",
1732
+ "create:gitlab:project",
1733
+ "create:project:gitlab"
1727
1734
  ]
1728
1735
  },
1729
- "gitlab:mr:list": {
1736
+ "gitlab:project:list": {
1730
1737
  "aliases": [],
1731
1738
  "args": {},
1732
- "description": "Defaults to open merge requests, which is what a list is nearly always for; pass --state all to include closed and merged ones. The IID column is the number to pass to the other mr commands — it is per-project, and is not the \"id\" field in the JSON payload.",
1739
+ "description": "Without --search this lists every project the token can reach, newest activity first, which on a large instance is not a useful answer — narrow it with --search or --membership. Use --simple for a much smaller payload when you only need ids and paths.",
1733
1740
  "examples": [
1734
- "<%= config.bin %> <%= command.id %> --project group/project",
1735
- "<%= config.bin %> <%= command.id %> --project group/project --state merged --target-branch main --limit 10",
1736
- "<%= config.bin %> <%= command.id %> --project group/project --author-username someone --json"
1741
+ "<%= config.bin %> <%= command.id %> --membership",
1742
+ "<%= config.bin %> <%= command.id %> --search platform --limit 10",
1743
+ "<%= config.bin %> <%= command.id %> --search platform --simple --json"
1737
1744
  ],
1738
1745
  "flags": {
1739
1746
  "json": {
@@ -1771,90 +1778,48 @@
1771
1778
  "multiple": false,
1772
1779
  "type": "option"
1773
1780
  },
1774
- "project": {
1775
- "char": "p",
1776
- "env": "GITLAB_PROJECT",
1777
- "name": "project",
1778
- "required": true,
1779
- "summary": "Project id, or its full path such as group/subgroup/project.",
1780
- "hasDynamicHelp": false,
1781
- "multiple": false,
1782
- "type": "option"
1783
- },
1784
1781
  "limit": {
1785
1782
  "name": "limit",
1786
- "summary": "Maximum number of merge requests to return across all pages.",
1783
+ "summary": "Maximum number of projects to return across all pages.",
1787
1784
  "default": 20,
1788
1785
  "hasDynamicHelp": false,
1789
1786
  "multiple": false,
1790
1787
  "type": "option"
1791
1788
  },
1792
- "state": {
1793
- "name": "state",
1794
- "summary": "Merge request state to return.",
1795
- "default": "opened",
1796
- "hasDynamicHelp": false,
1797
- "multiple": false,
1798
- "options": [
1799
- "opened",
1800
- "closed",
1801
- "locked",
1802
- "merged",
1803
- "all"
1804
- ],
1805
- "type": "option"
1806
- },
1807
- "source-branch": {
1808
- "name": "source-branch",
1809
- "summary": "Only merge requests from this source branch.",
1810
- "hasDynamicHelp": false,
1811
- "multiple": false,
1812
- "type": "option"
1813
- },
1814
- "target-branch": {
1815
- "name": "target-branch",
1816
- "summary": "Only merge requests into this target branch.",
1817
- "hasDynamicHelp": false,
1818
- "multiple": false,
1819
- "type": "option"
1820
- },
1821
- "author-username": {
1822
- "name": "author-username",
1823
- "summary": "Only merge requests opened by this username.",
1789
+ "search": {
1790
+ "name": "search",
1791
+ "summary": "Match against the project name and path.",
1824
1792
  "hasDynamicHelp": false,
1825
1793
  "multiple": false,
1826
1794
  "type": "option"
1827
1795
  },
1828
- "reviewer-username": {
1829
- "name": "reviewer-username",
1830
- "summary": "Only merge requests this username is reviewing.",
1831
- "hasDynamicHelp": false,
1832
- "multiple": false,
1833
- "type": "option"
1796
+ "membership": {
1797
+ "name": "membership",
1798
+ "summary": "Only projects you are a member of.",
1799
+ "allowNo": false,
1800
+ "type": "boolean"
1834
1801
  },
1835
- "labels": {
1836
- "name": "labels",
1837
- "summary": "Comma-separated labels every result must carry.",
1838
- "hasDynamicHelp": false,
1839
- "multiple": false,
1840
- "type": "option"
1802
+ "owned": {
1803
+ "name": "owned",
1804
+ "summary": "Only projects you own.",
1805
+ "allowNo": false,
1806
+ "type": "boolean"
1841
1807
  },
1842
- "search": {
1843
- "name": "search",
1844
- "summary": "Match against the title and description.",
1845
- "hasDynamicHelp": false,
1846
- "multiple": false,
1847
- "type": "option"
1808
+ "simple": {
1809
+ "name": "simple",
1810
+ "summary": "Return only the core fields, for a much smaller payload.",
1811
+ "allowNo": false,
1812
+ "type": "boolean"
1848
1813
  }
1849
1814
  },
1850
1815
  "hasDynamicHelp": false,
1851
1816
  "hiddenAliases": [],
1852
- "id": "gitlab:mr:list",
1817
+ "id": "gitlab:project:list",
1853
1818
  "pluginAlias": "@simplysf/simply-gitlab",
1854
1819
  "pluginName": "@simplysf/simply-gitlab",
1855
1820
  "pluginType": "core",
1856
1821
  "strict": true,
1857
- "summary": "List merge requests for a project.",
1822
+ "summary": "List projects you can see.",
1858
1823
  "enableJsonFlag": true,
1859
1824
  "isWrite": false,
1860
1825
  "isESM": true,
@@ -1862,27 +1827,26 @@
1862
1827
  "lib",
1863
1828
  "commands",
1864
1829
  "gitlab",
1865
- "mr",
1830
+ "project",
1866
1831
  "list.js"
1867
1832
  ],
1868
1833
  "aliasPermutations": [],
1869
1834
  "permutations": [
1870
- "gitlab:mr:list",
1871
- "mr:gitlab:list",
1872
- "mr:list:gitlab",
1873
- "gitlab:list:mr",
1874
- "list:gitlab:mr",
1875
- "list:mr:gitlab"
1835
+ "gitlab:project:list",
1836
+ "project:gitlab:list",
1837
+ "project:list:gitlab",
1838
+ "gitlab:list:project",
1839
+ "list:gitlab:project",
1840
+ "list:project:gitlab"
1876
1841
  ]
1877
1842
  },
1878
- "gitlab:mr:update": {
1843
+ "gitlab:project:view": {
1879
1844
  "aliases": [],
1880
1845
  "args": {},
1881
- "description": "Only the attributes you name are changed, with one exception worth knowing: --labels replaces the whole label set rather than adding to it.\n\nNaming nothing to change is refused rather than sent, because GitLab answers an empty update with a cheerful 200 and an unchanged merge request. --state close and --state reopen do what the buttons of those names do; neither merges anything.",
1846
+ "description": "Accepts either the numeric id or the full path. Use --json for the complete, unmodified API payload, which carries far more than the summary below — permissions, statistics, and every feature toggle on the project.",
1882
1847
  "examples": [
1883
- "<%= config.bin %> <%= command.id %> --project group/project --mr 42 --title \"feat: renamed\"",
1884
- "<%= config.bin %> <%= command.id %> --project group/project --mr 42 --state close",
1885
- "<%= config.bin %> <%= command.id %> --project group/project --mr 42 --labels backend,urgent --dry-run"
1848
+ "<%= config.bin %> <%= command.id %> --project group/project",
1849
+ "<%= config.bin %> <%= command.id %> --project 1234 --json"
1886
1850
  ],
1887
1851
  "flags": {
1888
1852
  "json": {
@@ -1929,82 +1893,159 @@
1929
1893
  "hasDynamicHelp": false,
1930
1894
  "multiple": false,
1931
1895
  "type": "option"
1932
- },
1933
- "dry-run": {
1934
- "name": "dry-run",
1935
- "summary": "Print the request that would be sent and exit without sending it.",
1936
- "allowNo": false,
1937
- "type": "boolean"
1938
- },
1939
- "mr": {
1940
- "name": "mr",
1941
- "required": true,
1942
- "summary": "Merge request iid.",
1943
- "hasDynamicHelp": false,
1896
+ }
1897
+ },
1898
+ "hasDynamicHelp": false,
1899
+ "hiddenAliases": [],
1900
+ "id": "gitlab:project:view",
1901
+ "pluginAlias": "@simplysf/simply-gitlab",
1902
+ "pluginName": "@simplysf/simply-gitlab",
1903
+ "pluginType": "core",
1904
+ "strict": true,
1905
+ "summary": "Show one project.",
1906
+ "enableJsonFlag": true,
1907
+ "isWrite": false,
1908
+ "isESM": true,
1909
+ "relativePath": [
1910
+ "lib",
1911
+ "commands",
1912
+ "gitlab",
1913
+ "project",
1914
+ "view.js"
1915
+ ],
1916
+ "aliasPermutations": [],
1917
+ "permutations": [
1918
+ "gitlab:project:view",
1919
+ "project:gitlab:view",
1920
+ "project:view:gitlab",
1921
+ "gitlab:view:project",
1922
+ "view:gitlab:project",
1923
+ "view:project:gitlab"
1924
+ ]
1925
+ },
1926
+ "gitlab:mr:create": {
1927
+ "aliases": [],
1928
+ "args": {},
1929
+ "description": "Both branches must already exist on the project. --draft prefixes the title with \"Draft: \", which is how GitLab itself marks a draft; there is no separate field for it.\n\nAssignees and reviewers are numeric user ids, not usernames — GitLab accepts only ids here. --body or --body-file supplies raw JSON for anything the flags do not cover, such as approval rules. Use --dry-run to see exactly what would be sent.",
1930
+ "examples": [
1931
+ "<%= config.bin %> <%= command.id %> --project group/project --source-branch feature --target-branch main --title \"feat: the thing\"",
1932
+ "<%= config.bin %> <%= command.id %> --project group/project --source-branch feature --target-branch main --title wip --draft --squash"
1933
+ ],
1934
+ "flags": {
1935
+ "json": {
1936
+ "description": "Format output as json.",
1937
+ "helpGroup": "GLOBAL",
1938
+ "name": "json",
1939
+ "allowNo": false,
1940
+ "type": "boolean"
1941
+ },
1942
+ "env-file": {
1943
+ "char": "e",
1944
+ "description": "Loaded before anything else. Variables already present in the environment win, so the file never overrides an explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.",
1945
+ "helpGroup": "CONNECTION",
1946
+ "name": "env-file",
1947
+ "summary": "Path to a .env file holding connection settings.",
1948
+ "hasDynamicHelp": false,
1944
1949
  "multiple": false,
1945
1950
  "type": "option"
1946
1951
  },
1947
- "title": {
1948
- "name": "title",
1949
- "summary": "New title.",
1952
+ "gitlab-url": {
1953
+ "env": "GITLAB_URL",
1954
+ "helpGroup": "CONNECTION",
1955
+ "name": "gitlab-url",
1956
+ "summary": "Base URL of the GitLab instance. Defaults to https://gitlab.com.",
1950
1957
  "hasDynamicHelp": false,
1951
1958
  "multiple": false,
1952
1959
  "type": "option"
1953
1960
  },
1954
- "description": {
1955
- "name": "description",
1956
- "summary": "New description, as Markdown.",
1961
+ "gitlab-token": {
1962
+ "env": "GITLAB_TOKEN",
1963
+ "helpGroup": "CONNECTION",
1964
+ "name": "gitlab-token",
1965
+ "summary": "Personal, project, or group access token.",
1966
+ "hasDynamicHelp": false,
1967
+ "multiple": false,
1968
+ "type": "option"
1969
+ },
1970
+ "project": {
1971
+ "char": "p",
1972
+ "env": "GITLAB_PROJECT",
1973
+ "name": "project",
1974
+ "required": true,
1975
+ "summary": "Project id, or its full path such as group/subgroup/project.",
1976
+ "hasDynamicHelp": false,
1977
+ "multiple": false,
1978
+ "type": "option"
1979
+ },
1980
+ "dry-run": {
1981
+ "name": "dry-run",
1982
+ "summary": "Print the request that would be sent and exit without sending it.",
1983
+ "allowNo": false,
1984
+ "type": "boolean"
1985
+ },
1986
+ "source-branch": {
1987
+ "name": "source-branch",
1988
+ "summary": "Branch holding the changes.",
1957
1989
  "hasDynamicHelp": false,
1958
1990
  "multiple": false,
1959
1991
  "type": "option"
1960
1992
  },
1961
1993
  "target-branch": {
1962
1994
  "name": "target-branch",
1963
- "summary": "New target branch.",
1995
+ "summary": "Branch the changes are proposed for.",
1964
1996
  "hasDynamicHelp": false,
1965
1997
  "multiple": false,
1966
1998
  "type": "option"
1967
1999
  },
1968
- "state": {
1969
- "name": "state",
1970
- "summary": "Close or reopen the merge request.",
2000
+ "title": {
2001
+ "name": "title",
2002
+ "summary": "Merge request title.",
1971
2003
  "hasDynamicHelp": false,
1972
2004
  "multiple": false,
1973
- "options": [
1974
- "close",
1975
- "reopen"
1976
- ],
1977
2005
  "type": "option"
1978
2006
  },
2007
+ "description": {
2008
+ "name": "description",
2009
+ "summary": "Merge request description, as Markdown.",
2010
+ "hasDynamicHelp": false,
2011
+ "multiple": false,
2012
+ "type": "option"
2013
+ },
2014
+ "draft": {
2015
+ "name": "draft",
2016
+ "summary": "Open it as a draft.",
2017
+ "allowNo": false,
2018
+ "type": "boolean"
2019
+ },
1979
2020
  "squash": {
1980
2021
  "name": "squash",
1981
2022
  "summary": "Squash the commits when it merges.",
1982
- "allowNo": true,
2023
+ "allowNo": false,
1983
2024
  "type": "boolean"
1984
2025
  },
1985
2026
  "remove-source-branch": {
1986
2027
  "name": "remove-source-branch",
1987
2028
  "summary": "Delete the source branch on merge.",
1988
- "allowNo": true,
2029
+ "allowNo": false,
1989
2030
  "type": "boolean"
1990
2031
  },
1991
2032
  "assignee-id": {
1992
2033
  "name": "assignee-id",
1993
- "summary": "User id to assign, replacing the set. Repeatable.",
2034
+ "summary": "User id to assign. Repeatable.",
1994
2035
  "hasDynamicHelp": false,
1995
2036
  "multiple": true,
1996
2037
  "type": "option"
1997
2038
  },
1998
2039
  "reviewer-id": {
1999
2040
  "name": "reviewer-id",
2000
- "summary": "User id to review, replacing the set. Repeatable.",
2041
+ "summary": "User id to request review from. Repeatable.",
2001
2042
  "hasDynamicHelp": false,
2002
2043
  "multiple": true,
2003
2044
  "type": "option"
2004
2045
  },
2005
2046
  "labels": {
2006
2047
  "name": "labels",
2007
- "summary": "Comma-separated labels, replacing the existing set.",
2048
+ "summary": "Comma-separated labels to apply.",
2008
2049
  "hasDynamicHelp": false,
2009
2050
  "multiple": false,
2010
2051
  "type": "option"
@@ -2036,12 +2077,12 @@
2036
2077
  },
2037
2078
  "hasDynamicHelp": false,
2038
2079
  "hiddenAliases": [],
2039
- "id": "gitlab:mr:update",
2080
+ "id": "gitlab:mr:create",
2040
2081
  "pluginAlias": "@simplysf/simply-gitlab",
2041
2082
  "pluginName": "@simplysf/simply-gitlab",
2042
2083
  "pluginType": "core",
2043
2084
  "strict": true,
2044
- "summary": "Change an existing merge request.",
2085
+ "summary": "Open a merge request.",
2045
2086
  "enableJsonFlag": true,
2046
2087
  "isWrite": true,
2047
2088
  "isESM": true,
@@ -2050,25 +2091,26 @@
2050
2091
  "commands",
2051
2092
  "gitlab",
2052
2093
  "mr",
2053
- "update.js"
2094
+ "create.js"
2054
2095
  ],
2055
2096
  "aliasPermutations": [],
2056
2097
  "permutations": [
2057
- "gitlab:mr:update",
2058
- "mr:gitlab:update",
2059
- "mr:update:gitlab",
2060
- "gitlab:update:mr",
2061
- "update:gitlab:mr",
2062
- "update:mr:gitlab"
2098
+ "gitlab:mr:create",
2099
+ "mr:gitlab:create",
2100
+ "mr:create:gitlab",
2101
+ "gitlab:create:mr",
2102
+ "create:gitlab:mr",
2103
+ "create:mr:gitlab"
2063
2104
  ]
2064
2105
  },
2065
- "gitlab:mr:view": {
2106
+ "gitlab:mr:list": {
2066
2107
  "aliases": [],
2067
2108
  "args": {},
2068
- "description": "Takes the project-scoped iid — the number in the merge request URL — not the instance-wide id. Use --json for the full payload, which carries the pipeline status, approvals, and diff refs the summary below leaves out.",
2109
+ "description": "Defaults to open merge requests, which is what a list is nearly always for; pass --state all to include closed and merged ones. The IID column is the number to pass to the other mr commands — it is per-project, and is not the \"id\" field in the JSON payload.",
2069
2110
  "examples": [
2070
- "<%= config.bin %> <%= command.id %> --project group/project --mr 42",
2071
- "<%= config.bin %> <%= command.id %> --project group/project --mr 42 --json"
2111
+ "<%= config.bin %> <%= command.id %> --project group/project",
2112
+ "<%= config.bin %> <%= command.id %> --project group/project --state merged --target-branch main --limit 10",
2113
+ "<%= config.bin %> <%= command.id %> --project group/project --author-username someone --json"
2072
2114
  ],
2073
2115
  "flags": {
2074
2116
  "json": {
@@ -2116,10 +2158,67 @@
2116
2158
  "multiple": false,
2117
2159
  "type": "option"
2118
2160
  },
2119
- "mr": {
2120
- "name": "mr",
2121
- "required": true,
2122
- "summary": "Merge request iid.",
2161
+ "limit": {
2162
+ "name": "limit",
2163
+ "summary": "Maximum number of merge requests to return across all pages.",
2164
+ "default": 20,
2165
+ "hasDynamicHelp": false,
2166
+ "multiple": false,
2167
+ "type": "option"
2168
+ },
2169
+ "state": {
2170
+ "name": "state",
2171
+ "summary": "Merge request state to return.",
2172
+ "default": "opened",
2173
+ "hasDynamicHelp": false,
2174
+ "multiple": false,
2175
+ "options": [
2176
+ "opened",
2177
+ "closed",
2178
+ "locked",
2179
+ "merged",
2180
+ "all"
2181
+ ],
2182
+ "type": "option"
2183
+ },
2184
+ "source-branch": {
2185
+ "name": "source-branch",
2186
+ "summary": "Only merge requests from this source branch.",
2187
+ "hasDynamicHelp": false,
2188
+ "multiple": false,
2189
+ "type": "option"
2190
+ },
2191
+ "target-branch": {
2192
+ "name": "target-branch",
2193
+ "summary": "Only merge requests into this target branch.",
2194
+ "hasDynamicHelp": false,
2195
+ "multiple": false,
2196
+ "type": "option"
2197
+ },
2198
+ "author-username": {
2199
+ "name": "author-username",
2200
+ "summary": "Only merge requests opened by this username.",
2201
+ "hasDynamicHelp": false,
2202
+ "multiple": false,
2203
+ "type": "option"
2204
+ },
2205
+ "reviewer-username": {
2206
+ "name": "reviewer-username",
2207
+ "summary": "Only merge requests this username is reviewing.",
2208
+ "hasDynamicHelp": false,
2209
+ "multiple": false,
2210
+ "type": "option"
2211
+ },
2212
+ "labels": {
2213
+ "name": "labels",
2214
+ "summary": "Comma-separated labels every result must carry.",
2215
+ "hasDynamicHelp": false,
2216
+ "multiple": false,
2217
+ "type": "option"
2218
+ },
2219
+ "search": {
2220
+ "name": "search",
2221
+ "summary": "Match against the title and description.",
2123
2222
  "hasDynamicHelp": false,
2124
2223
  "multiple": false,
2125
2224
  "type": "option"
@@ -2127,12 +2226,12 @@
2127
2226
  },
2128
2227
  "hasDynamicHelp": false,
2129
2228
  "hiddenAliases": [],
2130
- "id": "gitlab:mr:view",
2229
+ "id": "gitlab:mr:list",
2131
2230
  "pluginAlias": "@simplysf/simply-gitlab",
2132
2231
  "pluginName": "@simplysf/simply-gitlab",
2133
2232
  "pluginType": "core",
2134
2233
  "strict": true,
2135
- "summary": "Show one merge request.",
2234
+ "summary": "List merge requests for a project.",
2136
2235
  "enableJsonFlag": true,
2137
2236
  "isWrite": false,
2138
2237
  "isESM": true,
@@ -2141,28 +2240,26 @@
2141
2240
  "commands",
2142
2241
  "gitlab",
2143
2242
  "mr",
2144
- "view.js"
2243
+ "list.js"
2145
2244
  ],
2146
2245
  "aliasPermutations": [],
2147
2246
  "permutations": [
2148
- "gitlab:mr:view",
2149
- "mr:gitlab:view",
2150
- "mr:view:gitlab",
2151
- "gitlab:view:mr",
2152
- "view:gitlab:mr",
2153
- "view:mr:gitlab"
2247
+ "gitlab:mr:list",
2248
+ "mr:gitlab:list",
2249
+ "mr:list:gitlab",
2250
+ "gitlab:list:mr",
2251
+ "list:gitlab:mr",
2252
+ "list:mr:gitlab"
2154
2253
  ]
2155
2254
  },
2156
- "gitlab:project:create": {
2255
+ "gitlab:mr:update": {
2157
2256
  "aliases": [],
2158
2257
  "args": {},
2159
- "description": "Creates the project in --namespace, or in the namespace of the token owner when none is given. Give it --name or --path; GitLab derives whichever one is missing.\n\n--template names one of the built-in templates GitLab ships, such as express or rails. To create from a custom template instead, add --custom-template for one the instance administrator registered, --template-group for one in a group, or use --template-project to name the template project itself by id or path — which GitLab prefers, because a name can be ambiguous. Add --template-group to --template-project when the template belongs to a group rather than the instance. Custom templates need a Premium or Ultimate instance.\n\nA template is applied asynchronously: this command returns as soon as the project record exists, with an import status of \"scheduled\", and the files arrive a few seconds later. Check \"project view\" until its import_status reads \"finished\" before writing to the repository. --dry-run prints the exact request body; a namespace or template given as a path is still looked up, so the printed ids are the ones that would be sent.",
2258
+ "description": "Only the attributes you name are changed, with one exception worth knowing: --labels replaces the whole label set rather than adding to it.\n\nNaming nothing to change is refused rather than sent, because GitLab answers an empty update with a cheerful 200 and an unchanged merge request. --state close and --state reopen do what the buttons of those names do; neither merges anything.",
2160
2259
  "examples": [
2161
- "<%= config.bin %> <%= command.id %> --name new-service --namespace platform/apps",
2162
- "<%= config.bin %> <%= command.id %> --name new-service --namespace platform/apps --template express --visibility internal",
2163
- "<%= config.bin %> <%= command.id %> --name new-service --namespace platform/apps --template service-skeleton --template-group platform/templates",
2164
- "<%= config.bin %> <%= command.id %> --path new-service --template-project platform/templates/service-skeleton --dry-run",
2165
- "<%= config.bin %> <%= command.id %> --name new-service --template-project platform/templates/service-skeleton --template-group platform/templates"
2260
+ "<%= config.bin %> <%= command.id %> --project group/project --mr 42 --title \"feat: renamed\"",
2261
+ "<%= config.bin %> <%= command.id %> --project group/project --mr 42 --state close",
2262
+ "<%= config.bin %> <%= command.id %> --project group/project --mr 42 --labels backend,urgent --dry-run"
2166
2263
  ],
2167
2264
  "flags": {
2168
2265
  "json": {
@@ -2200,96 +2297,98 @@
2200
2297
  "multiple": false,
2201
2298
  "type": "option"
2202
2299
  },
2300
+ "project": {
2301
+ "char": "p",
2302
+ "env": "GITLAB_PROJECT",
2303
+ "name": "project",
2304
+ "required": true,
2305
+ "summary": "Project id, or its full path such as group/subgroup/project.",
2306
+ "hasDynamicHelp": false,
2307
+ "multiple": false,
2308
+ "type": "option"
2309
+ },
2203
2310
  "dry-run": {
2204
2311
  "name": "dry-run",
2205
2312
  "summary": "Print the request that would be sent and exit without sending it.",
2206
2313
  "allowNo": false,
2207
2314
  "type": "boolean"
2208
2315
  },
2209
- "name": {
2210
- "name": "name",
2211
- "summary": "Project name. The path is derived from it when --path is not given.",
2316
+ "mr": {
2317
+ "name": "mr",
2318
+ "required": true,
2319
+ "summary": "Merge request iid.",
2212
2320
  "hasDynamicHelp": false,
2213
2321
  "multiple": false,
2214
2322
  "type": "option"
2215
2323
  },
2216
- "path": {
2217
- "name": "path",
2218
- "summary": "Repository path, the URL slug. The name is derived from it when --name is not given.",
2324
+ "title": {
2325
+ "name": "title",
2326
+ "summary": "New title.",
2219
2327
  "hasDynamicHelp": false,
2220
2328
  "multiple": false,
2221
2329
  "type": "option"
2222
2330
  },
2223
- "namespace": {
2224
- "description": "Defaults to the namespace of the token owner.",
2225
- "name": "namespace",
2226
- "summary": "Group or user namespace to create the project in, by id or full path.",
2331
+ "description": {
2332
+ "name": "description",
2333
+ "summary": "New description, as Markdown.",
2227
2334
  "hasDynamicHelp": false,
2228
2335
  "multiple": false,
2229
2336
  "type": "option"
2230
2337
  },
2231
- "description": {
2232
- "name": "description",
2233
- "summary": "Project description.",
2338
+ "target-branch": {
2339
+ "name": "target-branch",
2340
+ "summary": "New target branch.",
2234
2341
  "hasDynamicHelp": false,
2235
2342
  "multiple": false,
2236
2343
  "type": "option"
2237
2344
  },
2238
- "visibility": {
2239
- "name": "visibility",
2240
- "summary": "Who can see the project.",
2345
+ "state": {
2346
+ "name": "state",
2347
+ "summary": "Close or reopen the merge request.",
2241
2348
  "hasDynamicHelp": false,
2242
2349
  "multiple": false,
2243
2350
  "options": [
2244
- "private",
2245
- "internal",
2246
- "public"
2351
+ "close",
2352
+ "reopen"
2247
2353
  ],
2248
2354
  "type": "option"
2249
2355
  },
2250
- "default-branch": {
2251
- "name": "default-branch",
2252
- "summary": "Name of the default branch.",
2253
- "hasDynamicHelp": false,
2254
- "multiple": false,
2255
- "type": "option"
2356
+ "squash": {
2357
+ "name": "squash",
2358
+ "summary": "Squash the commits when it merges.",
2359
+ "allowNo": true,
2360
+ "type": "boolean"
2256
2361
  },
2257
- "initialize-with-readme": {
2258
- "name": "initialize-with-readme",
2259
- "summary": "Create a first commit holding a README, so the repository is not empty.",
2260
- "allowNo": false,
2362
+ "remove-source-branch": {
2363
+ "name": "remove-source-branch",
2364
+ "summary": "Delete the source branch on merge.",
2365
+ "allowNo": true,
2261
2366
  "type": "boolean"
2262
2367
  },
2263
- "topics": {
2264
- "name": "topics",
2265
- "summary": "Comma-separated topics to label the project with.",
2368
+ "assignee-id": {
2369
+ "name": "assignee-id",
2370
+ "summary": "User id to assign, replacing the set. Repeatable.",
2266
2371
  "hasDynamicHelp": false,
2267
- "multiple": false,
2372
+ "multiple": true,
2268
2373
  "type": "option"
2269
2374
  },
2270
- "template": {
2271
- "name": "template",
2272
- "summary": "Template to create from: a built-in name, or with --custom-template or --template-group a custom one.",
2375
+ "reviewer-id": {
2376
+ "name": "reviewer-id",
2377
+ "summary": "User id to review, replacing the set. Repeatable.",
2273
2378
  "hasDynamicHelp": false,
2274
- "multiple": false,
2379
+ "multiple": true,
2275
2380
  "type": "option"
2276
2381
  },
2277
- "custom-template": {
2278
- "name": "custom-template",
2279
- "summary": "Look --template up among the instance's custom project templates rather than the built-in ones.",
2280
- "allowNo": false,
2281
- "type": "boolean"
2282
- },
2283
- "template-group": {
2284
- "name": "template-group",
2285
- "summary": "Group whose custom project templates --template or --template-project names, by id or full path.",
2382
+ "labels": {
2383
+ "name": "labels",
2384
+ "summary": "Comma-separated labels, replacing the existing set.",
2286
2385
  "hasDynamicHelp": false,
2287
2386
  "multiple": false,
2288
2387
  "type": "option"
2289
2388
  },
2290
- "template-project": {
2291
- "name": "template-project",
2292
- "summary": "Custom template project to create from, by id or full path. Cannot be combined with --template.",
2389
+ "milestone-id": {
2390
+ "name": "milestone-id",
2391
+ "summary": "Milestone id to attach.",
2293
2392
  "hasDynamicHelp": false,
2294
2393
  "multiple": false,
2295
2394
  "type": "option"
@@ -2314,12 +2413,12 @@
2314
2413
  },
2315
2414
  "hasDynamicHelp": false,
2316
2415
  "hiddenAliases": [],
2317
- "id": "gitlab:project:create",
2416
+ "id": "gitlab:mr:update",
2318
2417
  "pluginAlias": "@simplysf/simply-gitlab",
2319
2418
  "pluginName": "@simplysf/simply-gitlab",
2320
2419
  "pluginType": "core",
2321
2420
  "strict": true,
2322
- "summary": "Create a project, blank or from a template.",
2421
+ "summary": "Change an existing merge request.",
2323
2422
  "enableJsonFlag": true,
2324
2423
  "isWrite": true,
2325
2424
  "isESM": true,
@@ -2327,133 +2426,26 @@
2327
2426
  "lib",
2328
2427
  "commands",
2329
2428
  "gitlab",
2330
- "project",
2331
- "create.js"
2332
- ],
2333
- "aliasPermutations": [],
2334
- "permutations": [
2335
- "gitlab:project:create",
2336
- "project:gitlab:create",
2337
- "project:create:gitlab",
2338
- "gitlab:create:project",
2339
- "create:gitlab:project",
2340
- "create:project:gitlab"
2341
- ]
2342
- },
2343
- "gitlab:project:list": {
2344
- "aliases": [],
2345
- "args": {},
2346
- "description": "Without --search this lists every project the token can reach, newest activity first, which on a large instance is not a useful answer — narrow it with --search or --membership. Use --simple for a much smaller payload when you only need ids and paths.",
2347
- "examples": [
2348
- "<%= config.bin %> <%= command.id %> --membership",
2349
- "<%= config.bin %> <%= command.id %> --search platform --limit 10",
2350
- "<%= config.bin %> <%= command.id %> --search platform --simple --json"
2351
- ],
2352
- "flags": {
2353
- "json": {
2354
- "description": "Format output as json.",
2355
- "helpGroup": "GLOBAL",
2356
- "name": "json",
2357
- "allowNo": false,
2358
- "type": "boolean"
2359
- },
2360
- "env-file": {
2361
- "char": "e",
2362
- "description": "Loaded before anything else. Variables already present in the environment win, so the file never overrides an explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.",
2363
- "helpGroup": "CONNECTION",
2364
- "name": "env-file",
2365
- "summary": "Path to a .env file holding connection settings.",
2366
- "hasDynamicHelp": false,
2367
- "multiple": false,
2368
- "type": "option"
2369
- },
2370
- "gitlab-url": {
2371
- "env": "GITLAB_URL",
2372
- "helpGroup": "CONNECTION",
2373
- "name": "gitlab-url",
2374
- "summary": "Base URL of the GitLab instance. Defaults to https://gitlab.com.",
2375
- "hasDynamicHelp": false,
2376
- "multiple": false,
2377
- "type": "option"
2378
- },
2379
- "gitlab-token": {
2380
- "env": "GITLAB_TOKEN",
2381
- "helpGroup": "CONNECTION",
2382
- "name": "gitlab-token",
2383
- "summary": "Personal, project, or group access token.",
2384
- "hasDynamicHelp": false,
2385
- "multiple": false,
2386
- "type": "option"
2387
- },
2388
- "limit": {
2389
- "name": "limit",
2390
- "summary": "Maximum number of projects to return across all pages.",
2391
- "default": 20,
2392
- "hasDynamicHelp": false,
2393
- "multiple": false,
2394
- "type": "option"
2395
- },
2396
- "search": {
2397
- "name": "search",
2398
- "summary": "Match against the project name and path.",
2399
- "hasDynamicHelp": false,
2400
- "multiple": false,
2401
- "type": "option"
2402
- },
2403
- "membership": {
2404
- "name": "membership",
2405
- "summary": "Only projects you are a member of.",
2406
- "allowNo": false,
2407
- "type": "boolean"
2408
- },
2409
- "owned": {
2410
- "name": "owned",
2411
- "summary": "Only projects you own.",
2412
- "allowNo": false,
2413
- "type": "boolean"
2414
- },
2415
- "simple": {
2416
- "name": "simple",
2417
- "summary": "Return only the core fields, for a much smaller payload.",
2418
- "allowNo": false,
2419
- "type": "boolean"
2420
- }
2421
- },
2422
- "hasDynamicHelp": false,
2423
- "hiddenAliases": [],
2424
- "id": "gitlab:project:list",
2425
- "pluginAlias": "@simplysf/simply-gitlab",
2426
- "pluginName": "@simplysf/simply-gitlab",
2427
- "pluginType": "core",
2428
- "strict": true,
2429
- "summary": "List projects you can see.",
2430
- "enableJsonFlag": true,
2431
- "isWrite": false,
2432
- "isESM": true,
2433
- "relativePath": [
2434
- "lib",
2435
- "commands",
2436
- "gitlab",
2437
- "project",
2438
- "list.js"
2429
+ "mr",
2430
+ "update.js"
2439
2431
  ],
2440
2432
  "aliasPermutations": [],
2441
2433
  "permutations": [
2442
- "gitlab:project:list",
2443
- "project:gitlab:list",
2444
- "project:list:gitlab",
2445
- "gitlab:list:project",
2446
- "list:gitlab:project",
2447
- "list:project:gitlab"
2434
+ "gitlab:mr:update",
2435
+ "mr:gitlab:update",
2436
+ "mr:update:gitlab",
2437
+ "gitlab:update:mr",
2438
+ "update:gitlab:mr",
2439
+ "update:mr:gitlab"
2448
2440
  ]
2449
2441
  },
2450
- "gitlab:project:view": {
2442
+ "gitlab:mr:view": {
2451
2443
  "aliases": [],
2452
2444
  "args": {},
2453
- "description": "Accepts either the numeric id or the full path. Use --json for the complete, unmodified API payload, which carries far more than the summary below — permissions, statistics, and every feature toggle on the project.",
2445
+ "description": "Takes the project-scoped iid — the number in the merge request URL — not the instance-wide id. Use --json for the full payload, which carries the pipeline status, approvals, and diff refs the summary below leaves out.",
2454
2446
  "examples": [
2455
- "<%= config.bin %> <%= command.id %> --project group/project",
2456
- "<%= config.bin %> <%= command.id %> --project 1234 --json"
2447
+ "<%= config.bin %> <%= command.id %> --project group/project --mr 42",
2448
+ "<%= config.bin %> <%= command.id %> --project group/project --mr 42 --json"
2457
2449
  ],
2458
2450
  "flags": {
2459
2451
  "json": {
@@ -2500,16 +2492,24 @@
2500
2492
  "hasDynamicHelp": false,
2501
2493
  "multiple": false,
2502
2494
  "type": "option"
2495
+ },
2496
+ "mr": {
2497
+ "name": "mr",
2498
+ "required": true,
2499
+ "summary": "Merge request iid.",
2500
+ "hasDynamicHelp": false,
2501
+ "multiple": false,
2502
+ "type": "option"
2503
2503
  }
2504
2504
  },
2505
2505
  "hasDynamicHelp": false,
2506
2506
  "hiddenAliases": [],
2507
- "id": "gitlab:project:view",
2507
+ "id": "gitlab:mr:view",
2508
2508
  "pluginAlias": "@simplysf/simply-gitlab",
2509
2509
  "pluginName": "@simplysf/simply-gitlab",
2510
2510
  "pluginType": "core",
2511
2511
  "strict": true,
2512
- "summary": "Show one project.",
2512
+ "summary": "Show one merge request.",
2513
2513
  "enableJsonFlag": true,
2514
2514
  "isWrite": false,
2515
2515
  "isESM": true,
@@ -2517,17 +2517,17 @@
2517
2517
  "lib",
2518
2518
  "commands",
2519
2519
  "gitlab",
2520
- "project",
2520
+ "mr",
2521
2521
  "view.js"
2522
2522
  ],
2523
2523
  "aliasPermutations": [],
2524
2524
  "permutations": [
2525
- "gitlab:project:view",
2526
- "project:gitlab:view",
2527
- "project:view:gitlab",
2528
- "gitlab:view:project",
2529
- "view:gitlab:project",
2530
- "view:project:gitlab"
2525
+ "gitlab:mr:view",
2526
+ "mr:gitlab:view",
2527
+ "mr:view:gitlab",
2528
+ "gitlab:view:mr",
2529
+ "view:gitlab:mr",
2530
+ "view:mr:gitlab"
2531
2531
  ]
2532
2532
  },
2533
2533
  "gitlab:release:list": {
@@ -3241,5 +3241,5 @@
3241
3241
  ]
3242
3242
  }
3243
3243
  },
3244
- "version": "0.6.1"
3244
+ "version": "0.6.3"
3245
3245
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@simplysf/simply-gitlab",
3
3
  "description": "Command-line interface for working with GitLab",
4
- "version": "0.6.1",
4
+ "version": "0.6.3",
5
5
  "author": "@ClayChipps",
6
6
  "homepage": "https://github.com/SimplySF/simply-gitlab",
7
7
  "bugs": "https://github.com/SimplySF/simply-gitlab/issues",
@@ -90,14 +90,14 @@
90
90
  },
91
91
  "dependencies": {
92
92
  "@oclif/core": "^4.11.2",
93
- "@simplysf/simply-gitlab-core": "^0.5.1"
93
+ "@simplysf/simply-gitlab-core": "^0.5.3"
94
94
  },
95
95
  "devDependencies": {
96
96
  "@oclif/plugin-command-snapshot": "^5.4.0",
97
- "@vitest/coverage-v8": "^4.1.10",
97
+ "@vitest/coverage-v8": "^4.1.12",
98
98
  "oclif": "^4.23.0",
99
99
  "shx": "^0.4.0",
100
- "vitest": "^4.1.10"
100
+ "vitest": "^4.1.12"
101
101
  },
102
102
  "publishConfig": {
103
103
  "access": "public"
@@ -245,5 +245,5 @@
245
245
  "service": true
246
246
  }
247
247
  },
248
- "gitHead": "dc8cdc8e13b8a4053d503cb5efbdb54f637aa19a"
248
+ "gitHead": "c942b3fc112f4486108ec402a4a7c4d4afbfdcd3"
249
249
  }