Skip to content

Update addToBackportingProject.scala #20461

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

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
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
31 changes: 26 additions & 5 deletions project/scripts/addToBackportingProject.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//> using scala 3.3.1
//> using toolkit 0.2.1
//> using lib pro.kordyjan::pytanie:0.1.7
//> using scala 3.lts
//> using toolkit 0.4.0
//> using lib pro.kordyjan::pytanie:0.1.9

import pytanie.*
import sttp.client4.*
Expand All @@ -10,8 +10,29 @@ lazy val apiToken =

case class ID(value: String) derives WrapperVariable

val PROJECT_ID = ID("PVT_kwDOACj3ec4AWSoi")
val FIELD_ID = ID("PVTF_lADOACj3ec4AWSoizgO7uJ4")
// Obtained with:
// query {
// organization(login: "scala") {
// projectV2(number: 2) {
// id
// }
// }
// }
val PROJECT_ID = ID("PVT_kwDN3uPOAHewkg")

// Obtained with:
// query {
// organization(login: "scala") {
// projectV2(number: 2) {
// field(name: "Merged at") {
// ... on ProjectV2FieldCommon {
// id
// }
// }
// }
// }
// }
val FIELD_ID = ID("PVTF_lADN3uPOAHewks4E3B1I")

@main def run(commitSha: String) =
val (id, date) = getPrData(commitSha)
Expand Down
Loading