Skip to content

build: convert pr-automerge-open-release.yml to a reusable workflow#6

Merged
nedbat merged 4 commits intomasterfrom
nedbat/pr-automerge-reusable-workflow
Jan 20, 2022
Merged

build: convert pr-automerge-open-release.yml to a reusable workflow#6
nedbat merged 4 commits intomasterfrom
nedbat/pr-automerge-reusable-workflow

Conversation

@nedbat
Copy link
Copy Markdown
Contributor

@nedbat nedbat commented Jan 18, 2022

Generally, we want to use reusable workflow rather than workflow templates. Templates copy code around, making it hard to maintain.

This changes the action to use a hard-coded list of merge approvers.

Also, I updated the actions to latest versions, and used a more typical yaml syntax.

@nedbat
Copy link
Copy Markdown
Contributor Author

nedbat commented Jan 18, 2022

This isn't working yet: tspascoal/get-user-teams-membership#5

@nedbat nedbat force-pushed the nedbat/pr-automerge-reusable-workflow branch 6 times, most recently from ce261d3 to 87482ed Compare January 19, 2022 21:45
@nedbat nedbat force-pushed the nedbat/pr-automerge-reusable-workflow branch from 87482ed to b38ed79 Compare January 19, 2022 21:51
@nedbat nedbat marked this pull request as ready for review January 19, 2022 21:52
@nedbat
Copy link
Copy Markdown
Contributor Author

nedbat commented Jan 19, 2022

@feanil @sarina @kdmccormick ?

@nedbat nedbat force-pushed the nedbat/pr-automerge-reusable-workflow branch from b38ed79 to d093277 Compare January 20, 2022 12:04
There was no need to store team names in secrets, but even when using
explicit team names in the action, it would fail (see GraphqlError at
the end of this commit message).

Also:

- Change the bot ping to @openedx-community-bot
- Removed the /cc mentions in the instruction comment.
- Updated third-party actions to their latest versions.

```
Run tspascoal/[email protected]
Getting teams for nedbat in org openedx. Will check if belongs to open-release-maintainers
GraphqlError: Resource not accessible by integration
    at /home/runner/work/_actions/tspascoal/get-user-teams-membership/v1.0.1/dist/index.js:1:27731
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async run (/home/runner/work/_actions/tspascoal/get-user-teams-membership/v1.0.1/dist/index.js:1:106026) {
  data: { user: { id: 'MDQ6VXNlcjIzNzg5' }, organization: null },
  errors: [
    {
      type: 'FORBIDDEN',
      path: [Array],
      extensions: [Object],
      locations: [Array],
      message: 'Resource not accessible by integration'
    }
  ],
  headers: {
    'access-control-allow-origin': '*',
    'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
    connection: 'close',
    'content-encoding': 'gzip',
    'content-security-policy': "default-src 'none'",
    'content-type': 'application/json; charset=utf-8',
    date: 'Wed, 19 Jan 2022 20:00:45 GMT',
    'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
    server: 'GitHub.com',
    'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
    'transfer-encoding': 'chunked',
    vary: 'Accept-Encoding, Accept, X-Requested-With',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'deny',
    'x-github-media-type': 'github.v3; format=json',
    'x-github-request-id': '0444:1CAB:51FC03:AE8BC4:61E86DED',
    'x-ratelimit-limit': '1000',
    'x-ratelimit-remaining': '998',
    'x-ratelimit-reset': '1642625635',
    'x-ratelimit-resource': 'graphql',
    'x-ratelimit-used': '2',
    'x-xss-protection': '0'
  },
  name: 'GraphqlError',
  request: {
    query: 'query($cursor: String, $org: String!, $userLogins: [String!], $username: String!)  {\n' +
      '            user(login: $username) {\n' +
      '                id\n' +
      '            }\n' +
      '            organization(login: $org) {\n' +
      '              teams (first:1, userLogins: $userLogins, after: $cursor) { \n' +
      '                  nodes {\n' +
      '                    name\n' +
      '                }\n' +
      '                pageInfo {\n' +
      '                  hasNextPage\n' +
      '                  endCursor\n' +
      '                }        \n' +
      '              }\n' +
      '            }\n' +
      '        }',
    variables: {
      cursor: null,
      org: 'openedx',
      userLogins: [Array],
      username: 'nedbat'
    }
  }
}
Error: Resource not accessible by integration
```
@nedbat nedbat force-pushed the nedbat/pr-automerge-reusable-workflow branch from d093277 to e479281 Compare January 20, 2022 12:05
@nedbat nedbat merged commit 2b85ef4 into master Jan 20, 2022
@nedbat nedbat deleted the nedbat/pr-automerge-reusable-workflow branch January 20, 2022 12:06
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 this pull request may close these issues.

3 participants