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

utils/wait-for-workflow crashing when repo belongs to a personal account and not an organization #147

Open
RupertBarrow opened this issue Jan 17, 2024 · 0 comments · May be fixed by #148
Open

Comments

@RupertBarrow
Copy link

I am using utils/wait-for-workflow in a repo under my personal account.

The context being sent to the GHA is the following :

context: Context {
  payload: {
    action: 'closed',
    number: 215,
    pull_request: {
		...
    },
    repository: {
		...
	},
	sender: {
			...
	      login: 'RupertBarrow',
			...
	      type: 'User',
	      url: 'https://api.github.com/users/RupertBarrow'
    }
  },
  eventName: 'pull_request_target',
  sha: 'xxx',
  ref: 'refs/heads/release',
  workflow: 'Backport',
  action: 'wait',
  actor: 'RupertBarrow',
  job: 'waitForRelease',
}

In your code (https://github.com/smartcontractkit/chainlink-github-actions/blob/main/utils/wait-for-workflows/action.yml#L45C15-L45C56), your are expecting a context.payload.organization (in context.payload.organization.login) but I am only sending a context.payload.sender (presumaby because I am working on a repo in my personal account, not part of an organization ?)

Line 45 should be
owner: context.payload.organization?.login || context.payload.sender?.login,
instead of
owner: context.payload.organization.login,

I will send you a PR.

RupertBarrow added a commit to RupertBarrow/chainlink-github-actions that referenced this issue Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant