Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Run GitHub workflows on all pull requests #5723

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: golangci-lint
on:
pull_request:
types: [opened, edited, synchronize, reopened]
branches:
- main
Comment on lines -5 to -6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: from which branch the linter config will be taken? from main or from the target branch?
Q: If I got this right, we are going to run a newer version of lint on old branches (previously checked with older versions). Could this introduce some problem?

Copy link
Member

@sbueringer sbueringer Nov 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First Q. I think ~ target branch:

The .github/workflows directory in your repository is searched for workflow files at the associated commit SHA or Git ref. The workflow files must be present in that commit SHA or Git ref to be considered.

For example, if the event occurred on a particular repository branch, then the workflow files must be present in the repository on that branch.
https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#example-using-multiple-events-with-activity-types-or-configuration

If I understood it correctly: Second Q.: it would use the version which is specified in the workflow file of the base/main/release branch. Or probably more precise the version which is configured in the last commit of the PR, but as long as the commit doesn't change the version it should be the same as on the base/main/release branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What @sbueringer said is correct. We would still be running the same version of lint that's checked in in the old branches. In order to validate that we can look at the golangci-lint job that will run on the backports of this PR on the release branch.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the clarification!

jobs:
golangci:
name: lint
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/lint-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: Check Markdown links

on:
push:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was running as post submit, I don't think anyone is paying attention to it though. Running in PRs is enough IMO.

branches:
- main
paths:
- '**.md'
pull_request:
types: [opened, edited, synchronize, reopened]
paths:
- '**.md'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
pull_request_target:
types: [opened, edited, reopened]
types: [opened, edited, synchronize, reopened]

jobs:
verify:
Expand Down