Skip to content

chore(auto-merge): remove target-repo input#190

Merged
LeoMcA merged 1 commit intomainfrom
auto-merge-without-target-repo
Mar 20, 2026
Merged

chore(auto-merge): remove target-repo input#190
LeoMcA merged 1 commit intomainfrom
auto-merge-without-target-repo

Conversation

@caugner
Copy link
Copy Markdown
Contributor

@caugner caugner commented Mar 18, 2026

Description

Update the auto-merge workflow, removing the obsolete target-repo input.

Motivation

Callers are meanwhile passing {{ github.repository }} as value, and instead prevent execution in forks via if: github.repository_owner == 'mdn', so this is no longer needed.

Additional details

Related issues and pull requests

Related to mdn/fred#1395.

Callers should prevent fork execution themselves.
@caugner caugner requested review from a team as code owners March 18, 2026 13:29
@caugner caugner requested review from LeoMcA and pepelsbey March 18, 2026 13:29
Copy link
Copy Markdown
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

Looks good, but a couple of questions: non-blocking if the answer is "no".

Comment thread docs/auto-merge.md
with:
auto-merge: true
secrets:
GH_TOKEN: ${{ secrets.AUTOMERGE_TOKEN }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remind me why we have to set permissions: contents: read and GH_TOKEN, is it just a temporary migration thing, or separation of concerns (contents: read is the implicit permissions the workflow gets to check out the repo, GH_TOKEN is what's used to merge the PR? Perhaps that should be documented

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Eventually, the contents: read permission should allow us to checkout private repositories if the workflow runs in that repository.

To achieve this, we first need to add contents: read in all calling workflow(s), and only then can we request the permission in the composable workflow, or else it will fail.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, would be nice to explain that in docs/auto-merge.md once we've completed the migration

@LeoMcA LeoMcA merged commit 21dea88 into main Mar 20, 2026
3 checks passed
@LeoMcA LeoMcA deleted the auto-merge-without-target-repo branch March 20, 2026 14:34
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