Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Pitgull bootstrap cli #264

Merged
merged 26 commits into from
Jun 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8967c1c
getting started, issues with CE3 in Scala 3
majk-p May 31, 2021
a0992d9
fix build
majk-p May 31, 2021
628ec6f
add merge requests querry
majk-p May 31, 2021
ccc3b5d
logger
majk-p Jun 5, 2021
e906f5a
implement gitlab client
majk-p Jun 8, 2021
4be5d69
fix workflow
majk-p Jun 8, 2021
c7d209a
close qualified merge requests
majk-p Jun 8, 2021
a250e9c
cleanup
majk-p Jun 8, 2021
8627f8a
clean up build.sbt
majk-p Jun 8, 2021
9ff5c41
delete MR instead of closing it, implement webhook creation API
majk-p Jun 9, 2021
e73fb2f
exclude bootstrap from publishing artifact
majk-p Jun 9, 2021
b5afe33
cleanup
majk-p Jun 9, 2021
d1051a6
fix webhook creation
majk-p Jun 9, 2021
d929b29
build native image in github actions
majk-p Jun 9, 2021
b778495
use workflow from https://github.com/scalameta/sbt-native-image\#gene…
majk-p Jun 9, 2021
2ac8fd9
add better-tostring, fix reflection config in native-image
majk-p Jun 11, 2021
45a7e70
revert to using sbt workflow configuration instead of native.yml
majk-p Jun 11, 2021
6f3e26f
change fixme to link an issue
majk-p Jun 11, 2021
3f83775
wait for user consent before deleting merge requests
majk-p Jun 11, 2021
a6c3ded
extend note about blocked decline for argument parsing
majk-p Jun 11, 2021
66c1ad4
add usage info to both program and readme.md
majk-p Jun 11, 2021
3c2c6fe
Update README.md
majk-p Jun 12, 2021
a97d0c8
use cats-effect Console, configure scalafmt for scala 3, format Main
majk-p Jun 12, 2021
ae4c417
update reflect-config for native-image, apply formatting, some cleanup
majk-p Jun 12, 2021
45f6991
update readme - add reasoning behind MR deletion
majk-p Jun 12, 2021
2d5d4b1
scalafmt
majk-p Jun 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ jobs:

- run: sbt --client '++${{ matrix.scala }}; test; missinglinkCheck'

- name: Build native image
run: sbt bootstrap/nativeImage

- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: pitgull-bootstrap-${{ matrix.os }}
path: ./bootstrap/target/native-image/bootstrap

- name: Compress target directories
run: tar cf targets.tar target gitlab/target core/target project/target

Expand Down
8 changes: 7 additions & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "2.7.5"
version = "3.0.0-RC5"
maxColumn = 140
align.preset = some
align.tokens.add = [
Expand Down Expand Up @@ -32,3 +32,9 @@ danglingParentheses.exclude = [
]
verticalMultiline.newlineAfterOpenParen = true
verticalMultiline.atDefnSite = true

fileOverride {
majk-p marked this conversation as resolved.
Show resolved Hide resolved
"glob:**/bootstrap/src/main/scala/**" {
majk-p marked this conversation as resolved.
Show resolved Hide resolved
runner.dialect = scala3
}
}
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@
[![Powered by cats](https://img.shields.io/badge/powered%20by-cats-blue.svg)](https://github.com/typelevel/cats)
![Gluten free](https://img.shields.io/badge/gluten-free-orange.svg)

## Integrating with Pitgull

Along with Pitgull, we provide a `pitgull-bootstrap` command line utility. This program prepares your GitLab project for integration with Pitgull by deleting existing Scala Steward merge requests and setting up a webhook for triggering Pitgull.

CLI Arguments:
--url - your gitlab url like https://gitlab.com/
--token - your gitlab personal token, needs to have full access to project
--project - project ID, can be found on project main page
--bot - user name of Scala Steward bot user
--webhook - Pitgull target url like https://pitgull.example.com/webhook

### Why delete existing merge requests?

Pitgull will only take action when it's triggered by a webhook. By deleting merge requests we make sure no Scala Steward MR gets unnoticed. If we'd only close them, Scala Steward wouldn't update them, so no webhook would be triggerd.

Additionally, if you have some legacy merge requests for single library, this program makes sure to clean them up. When Scala Steward notices that some dependency is out of date and MR is missing - it will recreate it, so no worries about skipping any updates.

## Development

### Useful commands/links
Expand Down
Loading