build: convert pr-automerge-open-release.yml to a reusable workflow#6
Merged
build: convert pr-automerge-open-release.yml to a reusable workflow#6
Conversation
13b101c to
b124919
Compare
Contributor
Author
|
This isn't working yet: tspascoal/get-user-teams-membership#5 |
cmltaWt0
reviewed
Jan 18, 2022
ce261d3 to
87482ed
Compare
87482ed to
b38ed79
Compare
Contributor
Author
feanil
approved these changes
Jan 20, 2022
b38ed79 to
d093277
Compare
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 ```
d093277 to
e479281
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.