File tree Expand file tree Collapse file tree 5 files changed +123
-0
lines changed
Expand file tree Collapse file tree 5 files changed +123
-0
lines changed Original file line number Diff line number Diff line change 1+ <!--
2+ Only for standalone PRs without Jira issue in the PR title:
3+ * Replace this comment with Epic ID to create a new Task in Jira
4+ * Replace this comment with Issue ID to create a new Sub-Task in Jira
5+ * Ignore or delete this note to create a new Task in Jira without a parent
6+ -->
7+
18Please review our [ contribution guidelines] ( https://github.com/SonarSource/sonar-scanner-azdo/blob/master/docs/contributing.md ) .
29
310And please ensure your pull request adheres to the following guidelines:
Original file line number Diff line number Diff line change 1+ name : Pull Request Closed
2+
3+ on :
4+ pull_request :
5+ types : [closed]
6+
7+ jobs :
8+ PullRequestMerged_job :
9+ name : Pull Request Merged
10+ runs-on : ubuntu-latest
11+ permissions :
12+ id-token : write
13+ pull-requests : read
14+ # For external PR, ticket should be moved manually
15+ if : |
16+ github.event.pull_request.head.repo.full_name == github.repository
17+ && github.event.pull_request.merged
18+ steps :
19+ - id : secrets
20+ uses : SonarSource/vault-action-wrapper@v3
21+ with :
22+ secrets : |
23+ development/kv/data/jira user | JIRA_USER;
24+ development/kv/data/jira token | JIRA_TOKEN;
25+ - uses : sonarsource/gh-action-lt-backlog/PullRequestClosed@v2
26+ with :
27+ github-token : ${{secrets.GITHUB_TOKEN}}
28+ jira-user : ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }}
29+ jira-token : ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Pull Request Created
2+
3+ on :
4+ pull_request :
5+ types : ["opened"]
6+
7+ jobs :
8+ PullRequestCreated_job :
9+ name : Pull Request Created
10+ runs-on : ubuntu-latest
11+ permissions :
12+ id-token : write
13+ # For external PR, ticket should be created manually
14+ if : |
15+ github.event.pull_request.head.repo.full_name == github.repository
16+ steps :
17+ - id : secrets
18+ uses : SonarSource/vault-action-wrapper@v3
19+ with :
20+ secrets : |
21+ development/github/token/{REPO_OWNER_NAME_DASH}-jira token | GITHUB_TOKEN;
22+ development/kv/data/jira user | JIRA_USER;
23+ development/kv/data/jira token | JIRA_TOKEN;
24+ - uses : sonarsource/gh-action-lt-backlog/PullRequestCreated@v2
25+ with :
26+ github-token : ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }}
27+ jira-user : ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }}
28+ jira-token : ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }}
29+ jira-project : SONARAZDO
Original file line number Diff line number Diff line change 1+ name : Request review
2+
3+ on :
4+ pull_request :
5+ types : ["review_requested"]
6+
7+ jobs :
8+ RequestReview_job :
9+ name : Request review
10+ runs-on : ubuntu-latest
11+ permissions :
12+ id-token : write
13+ # For external PR, ticket should be moved manually
14+ if : |
15+ github.event.pull_request.head.repo.full_name == github.repository
16+ steps :
17+ - id : secrets
18+ uses : SonarSource/vault-action-wrapper@v3
19+ with :
20+ secrets : |
21+ development/github/token/{REPO_OWNER_NAME_DASH}-jira token | GITHUB_TOKEN;
22+ development/kv/data/jira user | JIRA_USER;
23+ development/kv/data/jira token | JIRA_TOKEN;
24+ - uses : sonarsource/gh-action-lt-backlog/RequestReview@v2
25+ with :
26+ github-token : ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }}
27+ jira-user : ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }}
28+ jira-token : ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Submit Review
2+
3+ on :
4+ pull_request_review :
5+ types : [submitted]
6+
7+ jobs :
8+ SubmitReview_job :
9+ name : Submit Review
10+ runs-on : ubuntu-latest
11+ permissions :
12+ id-token : write
13+ pull-requests : read
14+ # For external PR, ticket should be moved manually
15+ if : |
16+ github.event.pull_request.head.repo.full_name == github.repository
17+ && (github.event.review.state == 'changes_requested'
18+ || github.event.review.state == 'approved')
19+ steps :
20+ - id : secrets
21+ uses : SonarSource/vault-action-wrapper@v3
22+ with :
23+ secrets : |
24+ development/kv/data/jira user | JIRA_USER;
25+ development/kv/data/jira token | JIRA_TOKEN;
26+ - uses : sonarsource/gh-action-lt-backlog/SubmitReview@v2
27+ with :
28+ github-token : ${{secrets.GITHUB_TOKEN}}
29+ jira-user : ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }}
30+ jira-token : ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }}
You can’t perform that action at this time.
0 commit comments