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
| import { useEffect } from "react"; | |
| import { AnalyticsBrowser, type Analytics } from "@june-so/analytics-next"; | |
| import { useInterval } from "@mantine/hooks"; | |
| const commands = ["page", "track", "identify"] as const; | |
| type JuneCommands = (typeof commands)[number]; | |
| let hasSentPageview = false; | |
| let analytics: Analytics | undefined; |
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
| // Hardcoded ID for the "flagged" field. | |
| issueInput.update.customfield_10600 = [[set: [[value: "Impediment"]]]] |
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
| def issueKey = issue.key | |
| def projectKey = issue.fields.project.key | |
| def projectLead = get("/rest/api/2/project/${projectKey}").asObject(Map).body['lead']['key'] | |
| logger.info("Project lead: ${projectLead}") | |
| // Docs for this endpoint: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-issue-issueIdOrKey-watchers-post | |
| def result = post("/rest/api/2/issue/${issueKey}/watchers") | |
| .header('Content-Type', 'application/json') | |
| .body("\"${projectLead}\"") |
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
| #!/bin/bash | |
| git diff $1 $2 --name-only > updates.txt | |
| tar zcf updates.tgz --files-from=updates.txt | |
| rm updates.txt | |
| echo "Created file updates.tgz with the following files:" | |
| tar -tf updates.tgz |
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
| LW.StreamControlController = Ember.ObjectController.extend | |
| sourceType: 'github' | |
| sourceTypes: ['github', 'twitter'] | |
| createNewSource: (-> | |
| if @get('sourceType') | |
| @clearNewSource() | |
| sourceType = @get('sourceType') + '_source' | |
| @set 'newParentSource', @store.createRecord('source', { stream: @get('model'), source_type: sourceType }) | |
| @set 'newSource', @store.createRecord(sourceType, { parent: @get('newParentSource') }) | |
| @get('newParentSource').set sourceType, @get('newSource') |
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
| LW.GithubSource = LW.Model.extend | |
| # Example: [master, develop] | |
| branches: DS.attr('array') | |
| # Returns a list that looks like "master, and develop" | |
| # If setting, just takes a comma separated list "master, develop" and turns it into [master, develop] | |
| comma_branches: ((key, value)-> | |
| arguments[0] = 'branches' | |
| @comma_separated.apply @, arguments | |
| ).property('branches') | |