Skip to content

Commit

Permalink
CR follow-up
Browse files Browse the repository at this point in the history
- rename signature to Terms of Service
- Adjust Check event trigger log message
  • Loading branch information
jprinet committed Oct 3, 2023
1 parent d89c9c8 commit 4e84692
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-terms-of-service-acceptance-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
with:
tos-location: 'https://foo.bar/tos.html'
white-list: '*'
signature-branch: ${{ github.event.repository.default_branch }}
signature-location: '.github/develocity-tos.json'
tos-acceptance-file-branch: ${{ github.event.repository.default_branch }}
tos-acceptance-file: '.github/develocity-tos.json'
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,25 +90,25 @@ These event allows access to the repository secrets (_Develocity Access Key_) wh
**Permissions**:

The following permissions are required for this action to operate:
- `contents: write`: to create/edit the signature file
- `contents: write`: to create/edit the Terms of Service acceptance file
- `pull-requests: write`: to comment the pull-request

**Action inputs**:

| Name | Description | Default |
|------------------------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `build-workflow-filename` | Filename of the workflow using `maven-build-scan/save` (called upon pull-request submission) | |
| `tos-location` | Terms Of Service location (URL) | |
| `develocity-url` | Develocity URL | |
| `develocity-access-key` | *Optional*: Develocity access key | |
| `develocity-allow-untrusted` | *Optional*: Develocity allow-untrusted flag | `false` |
| `signature-branch` | *Optional*: Git branch where the signature file will be stored | `${{ github.event.repository.default_branch }}` |
| `signature-location` | *Optional*: Signature file location | `.github/develocity-tos.json` |
| `pr-comment-tos-acceptance-missing` | *Optional*: pull-request comment added when Terms of Service have not previously been accepted | `Please accept [Develocity Terms Of Service]({0}) to get your pull-request Build Scan published by commenting this pull-request with the following message:` |
| `pr-comment-tos-acceptance-request` | *Optional*: pull-request comment to accept the Terms of Service | `I have read Develocity Terms Of Service and I hereby accept the Terms` |
| `pr-comment-tos-acceptance-confirmation` | *Optional*: pull-request comment added when Terms of Service are accepted | `All Contributors have accepted Develocity Terms Of Service.` |
| `white-list` | *Optional*: CSV List of users not required to accept the Terms of Service | `''` |
| `github-token` | *Optional*: Github token | `${{ github.token }}` |
| Name | Description | Default |
|-------------------------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `build-workflow-filename` | Filename of the workflow using `maven-build-scan/save` (called upon pull-request submission) | |
| `tos-location` | Terms Of Service location (URL) | |
| `develocity-url` | Develocity URL | |
| `develocity-access-key` | *Optional*: Develocity access key | |
| `develocity-allow-untrusted` | *Optional*: Develocity allow-untrusted flag | `false` |
| `tos-acceptance-file-branch` | *Optional*: Git branch where the Terms of Service acceptance file will be stored | `${{ github.event.repository.default_branch }}` |
| `tos-acceptance-file` | *Optional*: Terms of Service acceptance file location | `.github/develocity-tos.json` |
| `pr-comment-tos-acceptance-missing` | *Optional*: pull-request comment added when Terms of Service have not previously been accepted | `Please accept [Develocity Terms Of Service]({0}) to get your pull-request Build Scan published by commenting this pull-request with the following message:` |
| `pr-comment-tos-acceptance-request` | *Optional*: pull-request comment to accept the Terms of Service | `I have read Develocity Terms Of Service and I hereby accept the Terms` |
| `pr-comment-tos-acceptance-confirmation` | *Optional*: pull-request comment added when Terms of Service are accepted | `All Contributors have accepted Develocity Terms Of Service.` |
| `white-list` | *Optional*: CSV List of users not required to accept the Terms of Service | `''` |
| `github-token` | *Optional*: Github token | `${{ github.token }}` |

**Usage**:

Expand Down Expand Up @@ -232,22 +232,22 @@ This action should be configured to respond to the following event triggers:
**Permissions**:

The following permissions are required for this action to operate:
- `contents: write`: to create/edit the signature file
- `contents: write`: to create/edit the Terms of Service acceptance file
- `pull-requests: write`: to comment the pull-request

**Action inputs**:

| Name | Description | Default |
|------------------------------------------|------------------------------------------------------------------------------------|---------|
| `tos-location` | Terms Of Service location (URL) | |
| `pr-number` | pull-request number | |
| `signature-branch` | Git branch where the signature file will be stored | |
| `signature-location` | Signature file location | |
| `pr-comment-tos-acceptance-missing` | pull-request comment added when Terms of Service have not previously been accepted | |
| `pr-comment-tos-acceptance-request` | pull-request comment to accept the Terms of Service | |
| `pr-comment-tos-acceptance-confirmation` | pull-request comment added when Terms of Service are accepted | |
| `white-list` | CSV List of users not required to accept the Terms of Service | |
| `github-token` | Github token | |
| Name | Description | Default |
|-------------------------------------------|------------------------------------------------------------------------------------|---------|
| `tos-location` | Terms Of Service location (URL) | |
| `pr-number` | pull-request number | |
| `tos-acceptance-file-branch` | Git branch where the Terms of Service acceptance file will be stored | |
| `tos-acceptance-file` | Terms of Service acceptance file location | |
| `pr-comment-tos-acceptance-missing` | pull-request comment added when Terms of Service have not previously been accepted | |
| `pr-comment-tos-acceptance-request` | pull-request comment to accept the Terms of Service | |
| `pr-comment-tos-acceptance-confirmation` | pull-request comment added when Terms of Service are accepted | |
| `white-list` | CSV List of users not required to accept the Terms of Service | |
| `github-token` | Github token | |

**Usage**:

Expand Down
12 changes: 6 additions & 6 deletions maven-build-scan/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ inputs:
pr-comment-tos-acceptance-validation:
description: 'pull-request comment added when Terms of Service are accepted'
default: 'All Contributors have accepted Develocity Terms of Service.'
signature-branch:
description: 'Git branch where the signature file will be stored'
tos-acceptance-file-branch:
description: 'Git branch where the Terms of Service acceptance file will be stored'
default: ${{ github.event.repository.default_branch }}
signature-location:
description: 'Signature file location'
tos-acceptance-file:
description: 'Terms of Service acceptance file location'
default: '.github/develocity-tos.json'
white-list:
description: 'CSV List of users not required to accept the Terms of Service'
Expand All @@ -57,8 +57,8 @@ runs:
pr-comment-tos-acceptance-missing: ${{ inputs.pr-comment-tos-acceptance-missing }}
pr-comment-tos-acceptance-request: ${{ inputs.pr-comment-tos-acceptance-request }}
pr-comment-tos-acceptance-validation: ${{ inputs.pr-comment-tos-acceptance-validation }}
signature-branch: ${{ inputs.signature-branch }}
signature-location: ${{ inputs.signature-location }}
tos-acceptance-file-branch: ${{ inputs.tos-acceptance-file-branch }}
tos-acceptance-file: ${{ inputs.tos-acceptance-file }}
white-list: ${{ inputs.white-list }}
github-token: ${{ inputs.github-token }}
- name: Publish Maven Build Scans
Expand Down
4 changes: 2 additions & 2 deletions maven-build-scan/load/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ outputs:
runs:
using: 'composite'
steps:
- name: Check event trigger
- name: Assert event trigger
if: |
(github.event_name != 'issue_comment'
|| (
Expand All @@ -27,7 +27,7 @@ runs:
)
&& github.event_name != 'workflow_run'
run: |
echo "Skipping Github event"
echo "Skipping the publication process due to unsupported event trigger"
exit 1
shell: bash
- name: Download Build Metadata after PR Build
Expand Down
12 changes: 6 additions & 6 deletions terms-of-service-acceptance/run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ inputs:
pr-comment-tos-acceptance-validation:
description: 'pull-request comment added when Terms of Service are accepted'
required: true
signature-branch:
description: 'Git branch where the signature file will be stored'
tos-acceptance-file-branch:
description: 'Git branch where the Terms of Service acceptance file will be stored'
required: true
signature-location:
description: 'Signature file location'
tos-acceptance-file:
description: 'Terms of Service acceptance file location'
required: true
white-list:
description: 'CSV List of users not required to accept the Terms of Service'
Expand All @@ -44,8 +44,8 @@ runs:
custom-notsigned-prcomment: ${{ format(inputs.pr-comment-tos-acceptance-missing, inputs.tos-location )}}
custom-pr-sign-comment: ${{ inputs.pr-comment-tos-acceptance-request }}
custom-allsigned-prcomment: ${{ inputs.pr-comment-tos-acceptance-validation }}
branch: ${{ inputs.signature-branch }}
path-to-signatures: ${{ inputs.signature-location }}
branch: ${{ inputs.tos-acceptance-file-branch }}
path-to-signatures: ${{ inputs.tos-acceptance-file }}
allowlist: ${{ inputs.white-list }}
path-to-document: 'unused'
lock-pullrequest-aftermerge: false
Expand Down

0 comments on commit 4e84692

Please sign in to comment.