Skip to content

Commit

Permalink
ci(PullRequestWorkflows): correct event to base changes (#27)
Browse files Browse the repository at this point in the history
### Correction on where to base the context when running actions

### Contribution Type

- [ ] Issue (Feature)
- [x] Issue (Bug Fix)
- [ ] Security Update

### Design Decisions

`pull_request_target` runs the workflow while based on the base branch -
for unit testing, this doesn't test the code that the user plans to
merge - rather the code that is already in the `main` branch.

Using `pull_request` event will correctly run the unit tests against
what the user is submitting in the pull_request.

### Testing

N/A
  • Loading branch information
richardkeit authored Feb 3, 2023
1 parent bceec00 commit b763d6f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-form.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ body:
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
render: Shell
- type: checkboxes
id: terms
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cfn-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Lint CloudFormation Templates

on:
pull_request_target:
pull_request:


jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request_target]
on: [pull_request]

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Python Lint
on:
pull_request_target:
pull_request:

jobs:
lint-python:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/state-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
name: AWS States Lint

on:
fork:
pull_request_target:
pull_request:

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Yaml Lint
on:
pull_request_target:
pull_request:

jobs:
lint-yaml:
Expand Down

0 comments on commit b763d6f

Please sign in to comment.