-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Project import generated by Copybara. (#73)
GitOrigin-RevId: 6af23f3594aae1b0f36177bfe8c706ef07c9350c Co-authored-by: Snowflake Authors <[email protected]>
- Loading branch information
1 parent
abe5b67
commit 72c6c24
Showing
50 changed files
with
1,222 additions
and
504 deletions.
There are no files selected for viewing
This file contains 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,38 @@ | ||
--- | ||
name: Jira closure | ||
|
||
on: | ||
issues: | ||
types: | ||
- closed | ||
- deleted | ||
|
||
jobs: | ||
close-issue: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: snowflakedb/gh-actions | ||
ref: jira_v1 | ||
token: ${{ secrets.SNOWFLAKE_GITHUB_TOKEN }} # stored in GitHub secrets | ||
path: . | ||
- name: Jira login | ||
uses: atlassian/gajira-login@master | ||
env: | ||
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | ||
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | ||
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | ||
- name: Extract issue from title | ||
id: extract | ||
env: | ||
TITLE: ${{ github.event.issue.title }} | ||
run: | | ||
jira=$(echo -n $TITLE | awk '{print $1}' | sed -e 's/://') | ||
echo ::set-output name=jira::$jira | ||
- name: Close issue | ||
uses: ./jira/gajira-close | ||
if: startsWith(steps.extract.outputs.jira, 'SNOW-') | ||
with: | ||
issue: ${{ steps.extract.outputs.jira }} |
This file contains 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,33 @@ | ||
--- | ||
name: Jira comment | ||
|
||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
|
||
jobs: | ||
comment-issue: | ||
if: ${{ !github.event.issue.pull_request }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Jira login | ||
uses: atlassian/gajira-login@master | ||
env: | ||
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | ||
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | ||
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | ||
- name: Extract issue from title | ||
id: extract | ||
env: | ||
TITLE: ${{ github.event.issue.title }} | ||
run: | | ||
jira=$(echo -n $TITLE | awk '{print $1}' | sed -e 's/://') | ||
echo ::set-output name=jira::$jira | ||
- name: Comment on issue | ||
uses: atlassian/gajira-comment@master | ||
if: startsWith(steps.extract.outputs.jira, 'SNOW-') | ||
with: | ||
issue: ${{ steps.extract.outputs.jira }} | ||
comment: "${{ github.event.comment.user.login }} commented:\n\n${{ github.event.comment.body }}\n\n${{ github.event.comment.html_url\ | ||
\ }}" |
This file contains 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,54 @@ | ||
--- | ||
name: Jira creation | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
issue_comment: | ||
types: | ||
- created | ||
|
||
jobs: | ||
create-issue: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
if: (github.event_name == 'issues' && github.event.pull_request.user.login != 'whitesource-for-github-com[bot]') | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: snowflakedb/gh-actions | ||
ref: jira_v1 | ||
token: ${{ secrets.SNOWFLAKE_GITHUB_TOKEN }} # stored in GitHub secrets | ||
path: . | ||
|
||
- name: Login | ||
uses: atlassian/[email protected] | ||
env: | ||
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | ||
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | ||
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | ||
|
||
- name: Create JIRA Ticket | ||
id: create | ||
uses: atlassian/[email protected] | ||
with: | ||
project: SNOW | ||
issuetype: Bug | ||
summary: ${{ github.event.issue.title }} | ||
description: | | ||
${{ github.event.issue.body }} \\ \\ _Created from GitHub Action_ for ${{ github.event.issue.html_url }} | ||
# Assign triage-ml-platform-dl and set "Data Platform: ML Engineering" component. | ||
fields: '{"customfield_11401":{"id":"14538"}, "assignee":{"id":"639020ab3c26ca7fa0d6eb3f"},"components":[{"id":"16520"}]}' | ||
|
||
- name: Update GitHub Issue | ||
uses: ./jira/gajira-issue-update | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
issue_number: '{{ event.issue.id }}' | ||
owner: '{{ event.repository.owner.login }}' | ||
name: '{{ event.repository.name }}' | ||
jira: ${{ steps.create.outputs.issue }} |
This file contains 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 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 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 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.