-
Couldn't load subscription status.
- Fork 5.5k
Linear App - updates and new components #18606
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
components/linear_app/actions/create-project/create-project.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| import linearApp from "../../linear_app.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "linear_app-create-project", | ||
| name: "Create Project", | ||
| description: "Create a project in Linear. [See the documentation](https://studio.apollographql.com/public/Linear-API/variant/current/schema/reference/inputs/ProjectCreateInput).", | ||
| type: "action", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| props: { | ||
| linearApp, | ||
| teamId: { | ||
| propDefinition: [ | ||
| linearApp, | ||
| "teamId", | ||
| ], | ||
| }, | ||
| name: { | ||
| type: "string", | ||
| label: "Name", | ||
| description: "The name of the project", | ||
| }, | ||
| description: { | ||
| type: "string", | ||
| label: "Description", | ||
| description: "The description of the project", | ||
| optional: true, | ||
| }, | ||
| statusId: { | ||
| propDefinition: [ | ||
| linearApp, | ||
| "projectStatusId", | ||
| ], | ||
| }, | ||
| priority: { | ||
| propDefinition: [ | ||
| linearApp, | ||
| "projectPriority", | ||
| ], | ||
| }, | ||
| memberIds: { | ||
| propDefinition: [ | ||
| linearApp, | ||
| "assigneeId", | ||
| ], | ||
| type: "string[]", | ||
| label: "Member IDs", | ||
| description: "The IDs of the members of the project", | ||
| optional: true, | ||
| }, | ||
| startDate: { | ||
| type: "string", | ||
| label: "Start Date", | ||
| description: "The start date of the project in ISO 8601 format", | ||
| optional: true, | ||
| }, | ||
| targetDate: { | ||
| type: "string", | ||
| label: "Target Date", | ||
| description: "The target date of the project in ISO 8601 format", | ||
| optional: true, | ||
| }, | ||
| labelIds: { | ||
| propDefinition: [ | ||
| linearApp, | ||
| "projectLabelIds", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.linearApp.client().createProject({ | ||
| teamIds: [ | ||
| this.teamId, | ||
| ], | ||
| name: this.name, | ||
| description: this.description, | ||
| statusId: this.statusId, | ||
| priority: this.priority, | ||
| memberIds: this.memberIds, | ||
| startDate: this.startDate, | ||
| targetDate: this.targetDate, | ||
| labelIds: this.labelIds, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully created project with ID ${response._project.id}`); | ||
|
|
||
| return response; | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
components/linear_app/actions/list-projects/list-projects.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| import linearApp from "../../linear_app.app.mjs"; | ||
| import utils from "../../common/utils.mjs"; | ||
|
|
||
| export default { | ||
| key: "linear_app-list-projects", | ||
| name: "List Projects", | ||
| description: "List projects in Linear. [See the documentation](https://studio.apollographql.com/public/Linear-API/variant/current/schema/reference/objects/ProjectConnection?query=projects).", | ||
| type: "action", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: true, | ||
| }, | ||
| props: { | ||
| linearApp, | ||
| teamId: { | ||
| propDefinition: [ | ||
| linearApp, | ||
| "teamId", | ||
| ], | ||
| }, | ||
| orderBy: { | ||
| propDefinition: [ | ||
| linearApp, | ||
| "orderBy", | ||
| ], | ||
| }, | ||
| first: { | ||
| type: "integer", | ||
| label: "First", | ||
| description: "The number of projects to return", | ||
| optional: true, | ||
| }, | ||
| after: { | ||
| type: "string", | ||
| label: "After", | ||
| description: "The cursor to return the next page of projects", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const variables = utils.buildVariables(this.after, { | ||
| filter: { | ||
| accessibleTeams: { | ||
| id: { | ||
| eq: this.teamId, | ||
| }, | ||
| }, | ||
| }, | ||
| orderBy: this.orderBy, | ||
| limit: this.first, | ||
| }); | ||
|
|
||
| const { | ||
| nodes, pageInfo, | ||
| } = await this.linearApp.listProjects(variables); | ||
|
|
||
| $.export("$summary", `Found ${nodes.length} projects`); | ||
|
|
||
| return { | ||
| nodes, | ||
| pageInfo, | ||
| }; | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.