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: attribution link #10365

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions .github/workflows/update-attributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
uses: actions/checkout@v4
with:
# Use PAT to ensure that the commit later can trigger status check workflows
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.ACTIONS_WRITE_TOKEN }}
- name: Checkout pull request
run: gh pr checkout "${PR_NUMBER}"
env:
Expand Down Expand Up @@ -144,8 +144,6 @@ jobs:
git config --global user.email 'metamaskbot@users.noreply.github.com'
git commit -am "Update Attributions"
git push
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_WRITE_TOKEN }}
- name: Post comment
run: |
if [[ $HAS_CHANGES == 'true' ]]
Expand Down
9 changes: 6 additions & 3 deletions app/components/Views/Settings/AppInformation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export default class AppInformation extends PureComponent {

state = {
appInfo: '',
appVersion: '',
};

updateNavBar = () => {
Expand All @@ -120,7 +121,10 @@ export default class AppInformation extends PureComponent {
const appName = await getApplicationName();
const appVersion = await getVersion();
const buildNumber = await getBuildNumber();
this.setState({ appInfo: `${appName} v${appVersion} (${buildNumber})` });
this.setState({
appInfo: `${appName} v${appVersion} (${buildNumber})`,
appVersion,
});
};

componentDidUpdate = () => {
Expand Down Expand Up @@ -150,8 +154,7 @@ export default class AppInformation extends PureComponent {
};

onAttributions = () => {
const url =
'https://raw.githubusercontent.com/MetaMask/metamask-mobile/main/attribution.txt';
const url = `https://raw.githubusercontent.com/MetaMask/metamask-mobile/v${this.state.appVersion}/attribution.txt`;
this.goTo(url, strings('app_information.attributions'));
};

Expand Down
Loading