44 IssueLabel ,
55 LinearClient ,
66 LinearClientOptions ,
7+ Project ,
78 Team ,
89} from "@linear/sdk" ;
910import { context } from "@actions/github" ;
@@ -18,6 +19,7 @@ type InputMap = {
1819 includeBranchName : boolean ;
1920 withTeam : boolean ;
2021 withLabels : boolean ;
22+ withProject : boolean ;
2123} ;
2224
2325type ApiKeyInput = Pick < LinearClientOptions , "apiKey" > ;
@@ -27,10 +29,11 @@ type PartsWithOpts<Type> = {
2729} ;
2830type PartsType = PartsWithOpts < { branch : void ; title : void ; body : void } > ;
2931
30- type LimitedIssue = Omit < Issue , "team" | "labels" > ;
32+ type LimitedIssue = Omit < Issue , "team" | "labels" | "project" > ;
3133type FoundIssueType = LimitedIssue & {
3234 team ?: Team | null ;
3335 labels ?: IssueLabel [ ] | null ;
36+ project ?: Project | null ;
3437} ;
3538
3639const main = async ( ) => {
@@ -52,6 +55,7 @@ const main = async () => {
5255 includeBranchName : boolCheck ( getInput ( "include-branch-name" ) , true ) ,
5356 withTeam : boolCheck ( getInput ( "with-team" ) , true ) ,
5457 withLabels : boolCheck ( getInput ( "with-labels" ) , true ) ,
58+ withProject : boolCheck ( getInput ( "with-project" ) , true ) ,
5559 } ;
5660
5761 const prParts : PartsType = {
@@ -118,6 +122,7 @@ const main = async () => {
118122 ...( issue as LimitedIssue ) ,
119123 team : inputs . withTeam ? await issue . team : null ,
120124 labels : inputs . withLabels ? ( await issue . labels ( ) ) . nodes : null ,
125+ project : inputs . withProject ? await issue . project : null ,
121126 } ;
122127 }
123128 ) ;
0 commit comments