Skip to content

Commit

Permalink
remove pr_head_sha input
Browse files Browse the repository at this point in the history
The sha of latest commit in the PR is obtained from the github metadata

+ some small README adjustments
  • Loading branch information
zmiklank committed Jan 23, 2024
1 parent e13ba48 commit bef5bb3
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 22 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ See [Testing Farm onboarding guide](https://docs.testing-farm.io/general/0.1/onb
| `debug` | Print debug logs when working with testing farm | true |
| `update_pull_request_status` | Action will update pull request status. | false |
| `environment_settings` | Pass custom settings to the test environment. | empty |
| `pr_head_sha` | SHA of the latest commit in PR. Used for setting commit statuses. | $(git rev-parse HEAD) |
| `create_github_summary` | Create summary of the Testing Farm as GiHub Action job. Possible options: "false", "true", "key=value" | true |
| `timeout` | Timeout for the Testing Farm job in minutes. | 480 |

Expand Down
10 changes: 3 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ inputs:
description: 'A testing farm API key'
required: true
git_url:
description: 'An url to the GIT repository'
description: 'An url to the GIT repository with TMT plans'
required: true
git_ref:
description: 'A tmt tests branch which will be used for tests'
required: false
default: 'master'
github_token:
description: GitHub TOKEN or PAT
description: 'GitHub TOKEN or PAT'
required: false
default: ${{ github.token }}
default: '${{ github.token }}'
tmt_plan_regex:
required: false
description: 'A tmt plan regex which will be used for selecting plans. By default all plans are selected.'
Expand Down Expand Up @@ -79,10 +79,6 @@ inputs:
description: 'Pass specific settings, like post-install-script, to the testing environment.'
required: false
default: '{}'
pr_head_sha:
description: 'HEAD SHA of a Pull Request. Used for posting statuses to the PR. The value is obtained from `git rev-parse HEAD` if this input is not set.'
required: false
default: ''
timeout:
description: 'Action is waiting for testing farm to finish or until timeout is reached. Value is in minutes.'
required: false
Expand Down
5 changes: 1 addition & 4 deletions dist/action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/action.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ async function action(pr: PullRequest): Promise<void> {
const api = new TestingFarmAPI(tfInstance);

// Get commit SHA value
let sha = getInput('pr_head_sha');
if (sha === '') {
sha = pr.sha;
}
const sha = pr.sha;
debug(`SHA: '${sha}'`);

// Set artifacts url
Expand Down

0 comments on commit bef5bb3

Please sign in to comment.