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

fix issues running connector dependency report on PRs from forks #18269

Merged
merged 5 commits into from
Oct 20, 2022
Merged
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
8 changes: 2 additions & 6 deletions .github/workflows/report-connectors-dependency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@ jobs:
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.

- name: Extract current branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${{ github.head_ref }})"
id: extract_branch
- name: Extract git-dif change file
- name: Extract git-diff changed files
run: |
git diff --name-only remotes/origin/master...origin/${{ steps.extract_branch.outputs.branch }} -- airbyte-integrations/ > ./changed_files.txt
git diff --name-only remotes/origin/master...HEAD -- airbyte-integrations/ > ./changed_files.txt
Comment on lines -21 to +17
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah... I think this is safe enough. The only downside here would be if you make 2 pushes really fast and the first action is running against what is now no longer HEAD because of the second push. But, this is just for making comments, so it doesn't need a global git lock :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is still fine, the action will be triggered again for the second push and output a new comment. Related, I made this issue recently for some improvements to this action #18139 (it's currently really spammy)

id: extract_changed_files
- name: Install dependencies
run: |
Expand Down